Homebrew ctrulib sound playing example

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
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 :)
 

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
0
XP
866
Country
Mashers, check ctrulib's great-refactor branch since cnsd will be deprecated shortly in ctrulib.
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
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?
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
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.
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
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.
 

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
0
XP
866
Country
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,

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
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.
 

lolzvid

Well-Known Member
Member
Joined
Dec 26, 2014
Messages
148
Trophies
0
Age
22
XP
278
Country
Brazil
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

General chit-chat
Help Users
    HiradeGirl @ HiradeGirl: Coming.