gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > OGG on DS!?

#134808 - hulksjedi - Tue Jul 17, 2007 2:57 am

Hi good developer community!

This is a question: any knows if it's possible to play ogg music on a DS? Moonshell does but not in a game. I'm producing a game and I wanted to know if there is a possibility to play OGG music, or if anyone heard of someone who made it.

Of course, we aren't talking about a CD quality music, just the basic quality.

We aren't talking about 4 minute songs either, just 20 seconds as much.

We aren't considering the possibility of using .xm either (or mod) because, the music is on .ogg and wav, so we are trying to research more on the ogg part (wav is possible we know).

Just that!
Hulk

#134820 - OOPMan - Tue Jul 17, 2007 8:16 am

Please try and do *some* of your own research....

There's this nice little thing called Tremor. It's a library designed for playing OGG files. It has a special version usable on low-power devices like the DS.

It's pretty usable, although I recall hearibng that it needs some modifications to the code to run perfectly on the DS...

You'll need to be very careful with your audio quality if you plan to use OGGs in a game on the DS. OGG files require more CPU time to decode, so doing so while running a game is a little tricky...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#134831 - tepples - Tue Jul 17, 2007 12:41 pm

OOPMan wrote:
There's this nice little thing called Tremor.

Which, in fact, MoonShell and DSOrganize use.

Quote:
It's pretty usable, although I recall hearibng that it needs some modifications to the code to run perfectly on the DS...

Can anyone describe these modifications, or should one try looking in the MoonShell source code first?

Quote:
You'll need to be very careful with your audio quality if you plan to use OGGs in a game on the DS. OGG files require more CPU time to decode, so doing so while running a game is a little tricky...

True, but I used streaming compressed audio (albeit not Vorbis) in a GBA game and it worked fine, so it should not prove difficult to find a quality/CPU sweet spot.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#134851 - hulksjedi - Tue Jul 17, 2007 7:08 pm

OOPMan,

Quote:
Please try and do *some* of your own research....


Well, I'm doing some of my research. But, btw, what's wrong with asking? it bothers? it makes the elite devs feel like they are answering newbies questions? this forum is full of question and answers, topics and conversations which makes it one of the best for DS and GBA development. Why asking a question bring answers like "Please try and do *some* of your own research.... " like if I were hurting someone by asking a question? Isn't the whole forum point to ask questions and collaborate with the knowledgement we gain to help other forum users to clear their own very questions?

Sorry if I made a question then. I used the search many weeks ago, I read every little post about Tremor but I wasn't sure if anyone accomplished something with OGG (wasn't clear for me).

Maybe was the term "research". Too formal. Bring the worst on people. Will remember not to use that one again between "this" kind of people...

Quote:
Can anyone describe these modifications, or should one try looking in the MoonShell source code first?


Exactly, that was what I was thinking this morning. The thing is, I don't believe anyone did it yet so there is no good implementation of it. Too bad, we dropped OGG implementation yesterday so... we aren't going to try either.

Thanks anyway everyone for your help... yep.

Hulk

#134852 - Devil_Spawn - Tue Jul 17, 2007 7:14 pm

convert them to mp3/wav?

#134854 - sonny_jim - Tue Jul 17, 2007 8:01 pm

I was thinking about porting Tremor to DSLinux but I'm not too sure if it'll have enough power to run a Linux kernel and decode ogg at the same time.

#134871 - Dood77 - Tue Jul 17, 2007 9:32 pm

Theres a topic around here somewhere about using the Helix mp3 decoder in games on the DS... Search is your friend.
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.

Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC

#134892 - DragonMinded - Wed Jul 18, 2007 12:57 am

tepples wrote:
OOPMan wrote:
It's pretty usable, although I recall hearibng that it needs some modifications to the code to run perfectly on the DS...

Can anyone describe these modifications, or should one try looking in the MoonShell source code first?


I didn't modify anything to get it working in DSOrganize. You simply need to set up the proper callbacks and call the proper functions. The modifications he might be referring to were the three memory leaks posted to random forums across the internet that were brought to my attention. It doesn't do anything to performance, just is better to know that it isn't leaking there anymore.
_________________
Enter the mind of the dragon.

http://dragonminded.blogspot.com

Seriously guys, how hard is it to simply TRY something yourself?

#134911 - OOPMan - Wed Jul 18, 2007 8:12 am

hulksjedi wrote:
OOPMan,

Quote:
Please try and do *some* of your own research....


Well, I'm doing some of my research. But, btw, what's wrong with asking? it bothers? it makes the elite devs feel like they are answering newbies questions? this forum is full of question and answers, topics and conversations which makes it one of the best for DS and GBA development. Why asking a question bring answers like "Please try and do *some* of your own research.... " like if I were hurting someone by asking a question? Isn't the whole forum point to ask questions and collaborate with the knowledgement we gain to help other forum users to clear their own very questions?

Sorry if I made a question then. I used the search many weeks ago, I read every little post about Tremor but I wasn't sure if anyone accomplished something with OGG (wasn't clear for me).

Maybe was the term "research". Too formal. Bring the worst on people. Will remember not to use that one again between "this" kind of people...


Sorry for jumping on you like that. I'm not an "elite dev" either. I just find it a little irritating when people don't use the forum search function and Google first to try and dig up information.

There have been many prior questions about OGG and Tremor on the DS, so I just think a new topic is more likely to end up being a duplicate than anything else.

Anyway, sorry for being bitchy :-)

Quote:
Quote:
Can anyone describe these modifications, or should one try looking in the MoonShell source code first?


Exactly, that was what I was thinking this morning. The thing is, I don't believe anyone did it yet so there is no good implementation of it. Too bad, we dropped OGG implementation yesterday so... we aren't going to try either.

Thanks anyway everyone for your help... yep.

Hulk


I believe the modification was in the form of a patch of some kind or other to the main Tremor source tree.
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#134912 - OOPMan - Wed Jul 18, 2007 8:14 am

DragonMinded wrote:
tepples wrote:
OOPMan wrote:
It's pretty usable, although I recall hearibng that it needs some modifications to the code to run perfectly on the DS...

Can anyone describe these modifications, or should one try looking in the MoonShell source code first?


I didn't modify anything to get it working in DSOrganize. You simply need to set up the proper callbacks and call the proper functions. The modifications he might be referring to were the three memory leaks posted to random forums across the internet that were brought to my attention. It doesn't do anything to performance, just is better to know that it isn't leaking there anymore.


Those were the ones :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#134931 - tepples - Wed Jul 18, 2007 1:57 pm

OOPMan wrote:
I'm not an "elite dev" either. I just find it a little irritating when people don't use the forum search function and Google first to try and dig up information.

Except forum.gbadev.org blocks Googlebot, and phpBB search is not without its major annoyances:
  • words such as "Ogg" are deemed stopwords, and stopwords are completely ignored
  • no stemming, that is, no easy way to match any word in the set {annoy, annoys, annoying, annoyed, annoyance, annoyances}
  • no phrase search
  • search is initially set to any of the words (OR logic), not all of the words (AND logic)
  • search is initially set to displaying the title of a topic with 150 posts in it, not the individual post
  • no user preferences to override these often counterproductive initial settings
  • must wait several seconds before revising your query
  • search result pages are POST, not GET, making it impossible to link to a result page

Quote:
There have been many prior questions about OGG and Tremor on the DS, so I just think a new topic is more likely to end up being a duplicate than anything else.

Given that Ogg is a stopword in this board's search, how are people supposed to go from the word "Ogg" to the word "Tremor"?

Back to topic:
Did the patches for these memory leaks in Tremor make it into Xiph's tree yet? And does Tremor come with a useful example of "set[ting] up the proper callbacks and call[ing] the proper functions"?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#134979 - josath - Wed Jul 18, 2007 11:47 pm

tepples wrote:
OOPMan wrote:
I'm not an "elite dev" either. I just find it a little irritating when people don't use the forum search function and Google first to try and dig up information.

Except forum.gbadev.org blocks Googlebot, and phpBB search is not without its major annoyances:
  • words such as "Ogg" are deemed stopwords, and stopwords are completely ignored
  • no stemming, that is, no easy way to match any word in the set {annoy, annoys, annoying, annoyed, annoyance, annoyances}
  • no phrase search
  • search is initially set to any of the words (OR logic), not all of the words (AND logic)
  • search is initially set to displaying the title of a topic with 150 posts in it, not the individual post
  • no user preferences to override these often counterproductive initial settings
  • must wait several seconds before revising your query
  • search result pages are POST, not GET, making it impossible to link to a result page

Quote:
There have been many prior questions about OGG and Tremor on the DS, so I just think a new topic is more likely to end up being a duplicate than anything else.

Given that Ogg is a stopword in this board's search, how are people supposed to go from the word "Ogg" to the word "Tremor"?

Back to topic:
Did the patches for these memory leaks in Tremor make it into Xiph's tree yet? And does Tremor come with a useful example of "set[ting] up the proper callbacks and call[ing] the proper functions"?


How about searching for 'vorbis' / 'ogg vorbis'? I assume most people are interested in that, and not so much the other things which start with 'ogg'

#135000 - OOPMan - Thu Jul 19, 2007 8:06 am

tepples wrote:
Given that Ogg is a stopword in this board's search, how are people supposed to go from the word "Ogg" to the word "Tremor"?


In my universe, one goes via Google, which then leads one to the Xiph page which leads one to Tremor which leads one to searching for Tremor in the GBADev forums :-)

Quote:
Back to topic:
Did the patches for these memory leaks in Tremor make it into Xiph's tree yet? And does Tremor come with a useful example of "set[ting] up the proper callbacks and call[ing] the proper functions"?


The Changelog of Tremor`s lowmem-branch does not seem to indicate so...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#135039 - DragonMinded - Thu Jul 19, 2007 5:28 pm

OOPMan wrote:
tepples wrote:
Back to topic:
Did the patches for these memory leaks in Tremor make it into Xiph's tree yet? And does Tremor come with a useful example of "set[ting] up the proper callbacks and call[ing] the proper functions"?


The Changelog of Tremor`s lowmem-branch does not seem to indicate so...


Well, why couldn't he have looked inside moonshell or dsorganize? Both sources display working ogg vorbis, and the latter has the files already patched for memleaks.
_________________
Enter the mind of the dragon.

http://dragonminded.blogspot.com

Seriously guys, how hard is it to simply TRY something yourself?