Homebrew ctrulib sound playing example

  • Thread starter Thread starter mashers
  • Start date Start date
  • Views Views 4,175
  • Replies Replies 22

mashers

Stubborn ape
Member
Joined
Jun 10, 2015
Messages
3,837
Reaction score
5,181
Trophies
0
Age
42
Location
Kongo Jungle
XP
5,129
Country
Can anyone point me to an example of playing a sound from a file in ctrulib? The only example I can find reads the audio data from the mic and then plays it back, whereas I need to load the sound data from a file on the SD card. Thanks in advance :)
 
Perfect - thanks buddy. Just need to work out how to convert to the bin file on the fly now so the user can just drop sound files in.
 
Mashers, check ctrulib's great-refactor branch since cnsd will be deprecated shortly in ctrulib.
 
Mashers, check ctrulib's great-refactor branch since cnsd will be deprecated shortly in ctrulib.
Oh I didn't see that branch. Should I switch to that branch for building everything from now on? Or should I stick with the current master branch until the great-refactor is merged into master?
 
Oh I didn't see that branch. Should I switch to that branch for building everything from now on? Or should I stick with the current master branch until the great-refactor is merged into master?

It's up to you, but if you like to keep up with the latest and 'greatest' (opinion-based, of course), you might want to make a separate branch of your code that's beginning to get ready for it. Some functions have different names and take different amounts of arguments with that branch.
 
It's up to you, but if you like to keep up with the latest and 'greatest' (opinion-based, of course), you might want to make a separate branch of your code that's beginning to get ready for it. Some functions have different names and take different amounts of arguments with that branch.
Ok, thanks. I can't actually see any difference in the audio example in the great-refactor branch. It still seems to be using csnd.
 
I'm not aware of how stable that branch is, dsp sound has been there for like two weeks, but I haven't messed around with it.

I'll ask in the irc channel how stable that is, but I don't think it is if it hasn't been merged yet, or maybe they are just waiting until ctrulib is more complete.

Edit: about audio sample, there isn't one with dsp atm.
 
Last edited by suloku,
I'm not aware of how stable that branch is, dsp sound has been there for like two weeks, but I haven't messed around with it.

I'll ask in the irc channel how stable that is, but I don't think it is if it hasn't been merged yet, or maybe they are just waiting until ctrulib is more complete.
Is there an example of the dsp sound? I can only find the ctrulib example.
 
On my experience, 44100hz was too fast.

I've changed it to 32000hz and it's now perfect ;)

Also, you only need to save a .wav file (with the specific proprieties) as .bin.
 
Last edited by lolzvid,

Site & Scene News

Popular threads in this forum