@@ 19,9 19,17 @@ type ChannelMixer struct {
// optional ?
// can be used for wave display (?)
// to display current buffer ?
+ // XXX can't be less than tick size ?
channelRenderBufAcc [][][2]float64
// XXX can be set (?)
+ // XXX can't be less than tick size ?
channelRenderBufAccLen int
+ // XXX ?
+ // 44100 = 1 sec (?) (sample rate)
+ // maximum size of channel acc bufer (~1s) (in samples)
+ // prevents buffers form over flowing
+ // conf.sr ?
+ channelRenderBufAccMaxLen int
// temp buffers ?
// when ready content should be set to
// channelRenderBufAcc ?
@@ 44,8 52,13 @@ func NewChannelMixer(s *ChannelSys) *Cha
channelSys: s,
// XXX
- channelRenderBufAccLen: 200,
+ //channelRenderBufAccLen: 200,
//channelRenderBufAccLen: 100,
+ // 1024/44100 = 0.023s
+ // 1024/100 = ~10 buffers (?)
+ // 44100/1024 = ~43 fps (maximum ?)
+ // 44100/100 = ~441 fps (maximum ?)
+ channelRenderBufAccLen: 1024,
accumulateBuffers: true,
//accumulateBuffers: false,
@@ 147,6 160,11 @@ func (cm *ChannelMixer) GetBufForChannel
return buf
}
+// take and truncate the accumulation buffer ?
+func (cm *ChannelMixer) TakeFromChannelRenderBufAcc(chId int, n int) [][2]float64 {
+ panic(2)
+}
+
// XXX
func (cm *ChannelMixer) GetChannelRenderBufAcc(chId int) [][2]float64 {