OGG stream using ARM-based sound co-processor
- Freeze
- DCEmu Respected
- Posts: 351
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Wed Oct 17, 2001 7:44 pm
- Location: Munich and Nuremberg / Germany
- Has thanked: 0
- Been thanked: 0
- Contact:
OGG stream using ARM-based sound co-processor
Hey guys,
buddy of mine is working on something Dreamcast related but the project came to an early stop. He's looking for a piece of code to play OGG vorbis stream using a ARM-based sound co-processor. Whichout it, the normal OGG playback support uses way too much resources.
Any ideas?
buddy of mine is working on something Dreamcast related but the project came to an early stop. He's looking for a piece of code to play OGG vorbis stream using a ARM-based sound co-processor. Whichout it, the normal OGG playback support uses way too much resources.
Any ideas?
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
I think you're going to have trouble with that. The ARM is slow. Really slow. In theory, it's clocked at around 45MHz. It has no cache, and shares it's memory with the sound hardware itself. Thus, there are some serious bus contention issues, and the sound hardware frequently gets exclusive access to SRAM. SRAM is also very slow. In effect, the ARM runs at nothing like 45MHz. It's very, very slow. I don't think you're going to be able to decode a Vorbis stream on it.
If you want to get the music playback completely out of the way, you could use CDDA instead, assuming you have enough room on the CD. If you want to distribute it over the 'net, you can pack up the soundtrack as Ogg Vorbis files (or whatever other format).
Other than that, all I can really do is suggest some ways to bring the CPU usage of the decoder down. For Vorbis, you can decrease the bitrate down to around 80Kbps. It still sounds OK (unless you have your DC connected to a proper speaker system you won't notice the difference), but doesn't use quite as much CPU time for decoding. You could try a codec that uses fewer resources to decode. MP3 is the obvious one, but that might not be appropriate (patent issues, the fact that the only decoder available with KOS is GPLed). AAC might be a better bet, if you can port FAAD over, and it sound a lot better than MP3, but you still might have patent issues if you ever wanted to sell it. The only other alternative that comes to mind is MP2, which isn't that great, but doesn't require much CPU time to decode at all.
If you want to get the music playback completely out of the way, you could use CDDA instead, assuming you have enough room on the CD. If you want to distribute it over the 'net, you can pack up the soundtrack as Ogg Vorbis files (or whatever other format).
Other than that, all I can really do is suggest some ways to bring the CPU usage of the decoder down. For Vorbis, you can decrease the bitrate down to around 80Kbps. It still sounds OK (unless you have your DC connected to a proper speaker system you won't notice the difference), but doesn't use quite as much CPU time for decoding. You could try a codec that uses fewer resources to decode. MP3 is the obvious one, but that might not be appropriate (patent issues, the fact that the only decoder available with KOS is GPLed). AAC might be a better bet, if you can port FAAD over, and it sound a lot better than MP3, but you still might have patent issues if you ever wanted to sell it. The only other alternative that comes to mind is MP2, which isn't that great, but doesn't require much CPU time to decode at all.
- az_bont
- Administrator
- Posts: 13567
- Joined: Sat Mar 09, 2002 8:35 am
- Location: Swansea, Wales
- Has thanked: 0
- Been thanked: 0
- Contact:
Musepack (MPC/MP+) is now being used in a couple of homebrew games for the PC. It has been designed to achieve transparency at the lowest possible bitrate, beating other codecs like WMA, Vorbis, AAC and MP3 at bitrates of 128kbps and above. However, as a consequence of this, it does not perform as well with low-bitrate encodes.BlackAura wrote:The only other alternative that comes to mind is MP2, which isn't that great, but doesn't require much CPU time to decode at all.
Although it is based on MP2, it has been heavily optimized and stripped of any patented code, whilst still requiring very little CPU time to decode.
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
-
- DCEmu Newbie
- Posts: 1
- Joined: Tue May 11, 2004 11:26 am
- Location: M?nchen, Germany
- Has thanked: 0
- Been thanked: 0
- Contact:
oh kewl, i didn't even know i'm registered for this forum.. but i apparently i am.
so, the buddy freeze speaks of should be me.
ARM7 built into the sound DSP runs at about 20 MHz if i remember correctly. i have seen a player to use the ARM on dreamcast - i just lost it soewhere. it claimed to be usually able to play 96kbit oggvorbis stream, which is quite enough - though one could experiment with encding settings to hit optimal quality where performance still suffices.
i know it was just libtremor compiled and stuff, however i just want a readymade player (not necessarily a perfect one) and not bother, i have to little time and too much to do.
so, the buddy freeze speaks of should be me.
ARM7 built into the sound DSP runs at about 20 MHz if i remember correctly. i have seen a player to use the ARM on dreamcast - i just lost it soewhere. it claimed to be usually able to play 96kbit oggvorbis stream, which is quite enough - though one could experiment with encding settings to hit optimal quality where performance still suffices.
i know it was just libtremor compiled and stuff, however i just want a readymade player (not necessarily a perfect one) and not bother, i have to little time and too much to do.
-
- bleemcast! Creator
- Posts: 882
- Joined: Wed Oct 17, 2001 7:44 pm
- Location: Los Angeles, CA
- Has thanked: 0
- Been thanked: 0
- Contact:
AFAIK, some types of ADPCM are infact patented -- either the algorithm, the filter coefficients, or both.
ADPCM was likely used in BOR because the DC can decode it in hardware without additional overhead.
Also, ADPCM isn't usually anywhere close to the space savings of OGG or MP3.
The DC's ARM is quite (read: incredibly) slow -- even doing fairly simple tasks can be a huge PITA.
Complex tasks are likely to be a tremendous time sink, as well as (generally) very difficult to achieve an acceptable solution.
Rand.
ADPCM was likely used in BOR because the DC can decode it in hardware without additional overhead.
Also, ADPCM isn't usually anywhere close to the space savings of OGG or MP3.
The DC's ARM is quite (read: incredibly) slow -- even doing fairly simple tasks can be a huge PITA.
Complex tasks are likely to be a tremendous time sink, as well as (generally) very difficult to achieve an acceptable solution.
Rand.