Re: [Osalp-dev] Fwd: Asynchronous playback?
Status: Abandoned
Brought to you by:
daservis
|
From: Bruce F. <for...@tn...> - 2001-10-24 04:58:55
|
Robert Pittana wrote: > > Perhaps I am doing things incorrectly. In your example code I noticed that you just copied the config from the input to the output. If I open two inputs and use the config from the lower sampling rate input source as a parameter into the output then all inputs play at that lower rate. This is why I thought I needed to do some manual conversion. > Let me explain how the config data is passed. The first time the process function is called a check of the audio chain is made. At the start of the chain should be some source of audio data such as an aflibAudioFile derived class. This sets the config data for the source. This is passed to each member of the audio chain up the chain. A member receives an input config data processes it and it becomes its output config data. Its output config data is passed to the input config of the next audio element in the chain. When the config data reaches the mixer class it has a setInputConfig member function. It will set the output config data based upon the input config data from 1 or more inputs. It is coded to output the sample rate that is the highest amoungst the inputs. The aflibAudio base class will automatically insert a aflibAudioSampleRateCvt class before any input that needs to have its sample rate converted. For the final output class in the chain you can set its config data to whatever you will want. Any conversions needed to be made will be made in the chain. Of course you need to be carefull or all your CPU will be taken up doing conversions. For the mixer class I need to look at the code in detail but it might not work for adding inputs dynamically. I need to work on this to make it work. Bruce Forsberg |