77
88// Mixer is a manager for mixing multiple single- and multi-channel samples into a single multi-channel output stream
99type Mixer struct {
10- Channels int
11- BitsPerSample int
10+ Channels int
1211}
1312
1413// NewMixBuffer returns a mixer buffer with a number of channels
@@ -42,8 +41,8 @@ func (m Mixer) Flatten(panmixer PanMixer, samplesLen int, row []ChannelData, mix
4241}
4342
4443// FlattenToInts runs a flatten on the channel data into separate channel data of int32 variety
45- // these int32s still respect the BitsPerSample size
46- func (m Mixer ) FlattenToInts (panmixer PanMixer , samplesLen int , row []ChannelData , mixerVolume volume.Volume ) [][]int32 {
44+ // these int32s still respect the bitsPerSample size
45+ func (m Mixer ) FlattenToInts (panmixer PanMixer , samplesLen , bitsPerSample int , row []ChannelData , mixerVolume volume.Volume ) [][]int32 {
4746 data := m .NewMixBuffer (samplesLen )
4847 for _ , rdata := range row {
4948 for _ , cdata := range rdata {
@@ -56,7 +55,7 @@ func (m Mixer) FlattenToInts(panmixer PanMixer, samplesLen int, row []ChannelDat
5655 }
5756 }
5857 }
59- return data .ToIntStream (panmixer .NumChannels (), samplesLen , m . BitsPerSample , mixerVolume )
58+ return data .ToIntStream (panmixer .NumChannels (), samplesLen , bitsPerSample , mixerVolume )
6059}
6160
6261// FlattenTo will to a final saturation mix of all the row's channel data into a single output buffer
0 commit comments