[subsynth-devel] [Task #46956] add PortAudio ostream
Status: Beta
Brought to you by:
subatomic
|
From: <no...@so...> - 2002-04-19 18:51:34
|
Task #46956 has been updated. Project: subsynth Subproject: audio iostreams Summary: add PortAudio ostream Complete: 90% Status: Open Authority : subatomic Assigned to: subatomic, nonchocoboy, aegis Description: with loki ging out of business, and with openal streams sucking so badly under unix.... we really need an OSS or sdl output stream implementation Follow-Ups: ------------------------------------------------------- Date: 2002-04-19 14:51 By: subatomic Comment: port audio works, but is in only one test. I'll close this once I am using it regularly in all tests. The initial results are good, Port Audio is SO much better than OpenAL for streaming of audio data... port audio operates with an asyncronous callback. since our audio ostream uses the polling method, I needed to cache the data sent in with write(), then dequeue the data inside the callback as needed. This was... interesting. Ostream allows arbitrary buffer sizes to be sent to write(), but portaudio only reads N frames at a time. This meant write() needed to enqueue a variable length buffer, and then the portaudio callback reads N frames from the available queued buffers. If no buffers are left to read, then of course there is an underun (starvation), and portaudio emits a little click (not good). TODO: if starvation detected, fade the value to zero, or fill in the rest of the buf with the last written value to prevent high frequency aliasing... ------------------------------------------------------- Date: 2002-04-08 17:20 By: subatomic Comment: we should implement a portaudio stream first. portaudio was designed by the music-dsp people, and is in use by many software synths. also has ASIO, DirectX, Win, Linux, SGI, etc... support. ------------------------------------------------------- For more info, visit: http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=46956&group_id=42943&group_project_id=15987 |