|
| | vbt said: |
Would it be possible on Saturn ? When I compare the size of the WAV and the size of the PCM, it's almost the same, so there could have only a small difference like a header. It could be stupid, I didn't read PCM and WAV specs.
|
Yes, it's possible. The conversion that has to be done is just sign-related and for stereo the channels are interleaved in wav files, while in PCM format it's two consecutive arrays. I guess the latter one suits better for DMA transfer...
Conversion from wav to pcm has already been done in the Saturn Sound Player. That Saturn app and the tool RB_SaturnPCM.EXE both use the same library RB_SaturnPCM.c. It performs the conversion in-place, meaning no additional memory is needed.
However, I think you want something different, like streaming. The PCM library of SBL performs streaming of AIFF files, so why don't you take these? In general on Saturn I think it's better to pre-convert all data stuff, rather than doing the conversion on the console. When providing the sound data on a low level, you could of course do the wav conversion on-the-fly. |