Announcing audsrv 0.75
Announcing audsrv 0.75
Greetings!
I am very pleased to announce the CVS import of audsrv 0.75. Audsrv comes to replace sjpcm, and provide an easy and stable way to utilize the SPU2. The EE side code is available under /ee/rpc/audsrv, and the IOP side is under /iop/sound/audsrv. A sample is available under /ee/rpc/audsrv/sample.
Features:
* demux on IOP side
* upsampling on IOP side (currently supports 11025, 12000, 22050 and 24000)
* stream based, not related to vsyncs (at all!)
* loaded with documentation :)
In the making:
* 8 bit support
* Mono support
* cdda support
* fill audio callback
Please send feature requests, and bug reports as private messages. SDL integration will be done soon.
Cheers!
-- gawd.
[/u]
I am very pleased to announce the CVS import of audsrv 0.75. Audsrv comes to replace sjpcm, and provide an easy and stable way to utilize the SPU2. The EE side code is available under /ee/rpc/audsrv, and the IOP side is under /iop/sound/audsrv. A sample is available under /ee/rpc/audsrv/sample.
Features:
* demux on IOP side
* upsampling on IOP side (currently supports 11025, 12000, 22050 and 24000)
* stream based, not related to vsyncs (at all!)
* loaded with documentation :)
In the making:
* 8 bit support
* Mono support
* cdda support
* fill audio callback
Please send feature requests, and bug reports as private messages. SDL integration will be done soon.
Cheers!
-- gawd.
[/u]
Errr
Is it just me, or is it blocking all the way around ?
So, for me, the actual requests are:
-) Using DMA transferts to move data from EE to IOP instead of using RPC (that is, the RPC should try to see where and how much data it can send, and then, set up a background DMA for it to fill in the buffers in the IOP)
-) Having a callback with a threshold so that the EE can have a playing thread which is blocked most of the time, and woken up by the callback from IOP when the IOP is okay to recieve more data (instead of just blocking when trying to send new data)
For example, in the Beats of Rage PS2 port, the sound data works by using double buffering. EE asks the player IRX to allocate two sound buffers of 2048 bytes, and sets a callback so that the IOP warns the EE when the buffer is ready to get refilled. Which the EE does by dma'ing data into the buffer.
Is it just me, or is it blocking all the way around ?
So, for me, the actual requests are:
-) Using DMA transferts to move data from EE to IOP instead of using RPC (that is, the RPC should try to see where and how much data it can send, and then, set up a background DMA for it to fill in the buffers in the IOP)
-) Having a callback with a threshold so that the EE can have a playing thread which is blocked most of the time, and woken up by the callback from IOP when the IOP is okay to recieve more data (instead of just blocking when trying to send new data)
For example, in the Beats of Rage PS2 port, the sound data works by using double buffering. EE asks the player IRX to allocate two sound buffers of 2048 bytes, and sets a callback so that the IOP warns the EE when the buffer is ready to get refilled. Which the EE does by dma'ing data into the buffer.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
I thought RPC uses DMA. If not, I will implement that, no biggie. How faster will that be?
As for the blocking issue. Check out the example, you are supposed to use audsrv_wait_audio(2048), which will block your EE thread, until there's enough space on the ringbuffer. I can implement a threshold callback, I already have something for IOP itself, it should be easy to add a Cmd Handler.
As for the blocking issue. Check out the example, you are supposed to use audsrv_wait_audio(2048), which will block your EE thread, until there's enough space on the ringbuffer. I can implement a threshold callback, I already have something for IOP itself, it should be easy to add a Cmd Handler.
RPC will use DMA, but will block until the reply is sent.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Well.
All of the functions are synchronous anyway. Even send_audio, which returns the number of bytes queued (just in case you didn't call wait_audio before hand and never know what hit you.) I don't think the speed pentaly for RPC instead of DMA is that big. I mean, for 48k you send between 50-100 packets a second. Is that much? I have no problem moving to DMA, but I still don't understand what the fuss it all about.
Thanks for the positive remarks, BraveDog.
Many people started using audsrv, I would just like to know how easy/hard the integration was. For future reference.
Thanks.
--gawd.
All of the functions are synchronous anyway. Even send_audio, which returns the number of bytes queued (just in case you didn't call wait_audio before hand and never know what hit you.) I don't think the speed pentaly for RPC instead of DMA is that big. I mean, for 48k you send between 50-100 packets a second. Is that much? I have no problem moving to DMA, but I still don't understand what the fuss it all about.
Thanks for the positive remarks, BraveDog.
Many people started using audsrv, I would just like to know how easy/hard the integration was. For future reference.
Thanks.
--gawd.
Just to let people know :
- Gawd added mono, stereo and upsampling support for :
22050, 16, 1, up_22050_16_mono
22050, 16, 2, up_22050_16_stereo
24000, 16, 2, up_24000_16_stereo
44110, 16, 2, up_44100_16_stereo
44100, 16, 1, up_44100_16_mono
44100, 16, 2, up_44100_16_stereo
48000, 16, 2, up_48000_16_stereo
- Pixel has exported audsrv functions to use it from IOP modules
More to come...
- Gawd added mono, stereo and upsampling support for :
22050, 16, 1, up_22050_16_mono
22050, 16, 2, up_22050_16_stereo
24000, 16, 2, up_24000_16_stereo
44110, 16, 2, up_44100_16_stereo
44100, 16, 1, up_44100_16_mono
44100, 16, 2, up_44100_16_stereo
48000, 16, 2, up_48000_16_stereo
- Pixel has exported audsrv functions to use it from IOP modules
More to come...
- TiTAN Art Division -
http://www.titandemo.org
http://www.titandemo.org