On Do, 2015-08-06 at 20:28 +0200, Kővágó, Zoltán wrote: > Backends no longer have to deal with mixeng, they just receive a buffer > in the correct sample format, all mixeng logic is now in the audio.c > (and mixeng.c). Backends also do not have to deal with soft voices. > > Backends now have two way to read/write sound: > * write and read functions: similar to old read/write functions, except > that they actually read/write the data to the backend instead of > placing it into the mixeng buffer. You no longer need run_in/run_out > afterwards. > * get_buffer_out/put_buffer_out: the first function returns a buffer > that can hold some audio data. The caller fills this buffer (maybe > partially) and calls put_buffer to actually write the data. This way > we can save copying the buffer in some cases (for example mmaped > audio). Similarly there's get_buffer_in/put_buffer_in for reading. > > Backends only have to support one access method, but they can support > both if they have efficient implementation for both cases.
Phew, this one became pretty big. Could this be splitted up? The s/int/size_t/ should be easy to separate. Also having individual patches for individual backends would be nice. Possibly you can first add the new interfaces, & helper functions, then switch backends over one by one, hooking the generic audio_pcm_hw_run_out() function into run_out callback, finally remove the old interfaces and call audio_pcm_hw_run_out directly. cheers, Gerd