Documentation
¶
Index ¶
- func AttenuateFloatBuffer(mixTrack *audio.FloatBuffer, numTracks, bufferSize int)
- func Mix(mixTrack *audio.FloatBuffer, sourceTracks []*TrackInfo, bitDepth int, ...) (mixBufferSize int)
- func MixWavDecoders(wavDecs []*wav.Decoder, wavOut *os.File, bitDepth int, attenuate bool) error
- func MixWavFiles(files []*string, outWavName *string, bitDepth int, attenuate bool) error
- func ReadWavsToBuffers(wavDecs []*wav.Decoder, tracks []*TrackInfo) (mixBufferSize int)
- func ScaleFloatBuffers(tracks []*TrackInfo, bitDepth int)
- func SumFloatBuffers(mixTrack *audio.FloatBuffer, sourceTracks []*TrackInfo) (mixBufferSize int)
- type TrackInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttenuateFloatBuffer ¶
func AttenuateFloatBuffer(mixTrack *audio.FloatBuffer, numTracks, bufferSize int)
Function to attenuate linearly to prevent clipping in real-time without knowing/using true peak, RMS, LUFS, etc.
func Mix ¶
func Mix(mixTrack *audio.FloatBuffer, sourceTracks []*TrackInfo, bitDepth int, attenuate bool) (mixBufferSize int)
Function to mix TrackInfo float buffers to a provided mix float buffer, performing common scaling and attenuation operations as needed, and return length of longest buffer
func MixWavDecoders ¶
Function to mix wav decoders and write mix to output
func MixWavFiles ¶
Function to mix wav files and write mix to output
func ReadWavsToBuffers ¶
Function to read PCM data from a wav decoder into a TrackInfo's buffers, set bufferSize, and return length of longest buffer
func ScaleFloatBuffers ¶
Function to scale input bit depth to output bit depth
func SumFloatBuffers ¶
func SumFloatBuffers(mixTrack *audio.FloatBuffer, sourceTracks []*TrackInfo) (mixBufferSize int)
Function to sum TrackInfo float buffers to a mix float buffer and return buffer size of mix, equal to length of longest buffer