#83467 - Dark Knight ez - Tue May 16, 2006 3:31 pm
I've been using the sample raw-sounds of devkitPro until now, and they work properly with my code.
Now, I've created some new samples... 1 channel, 22050 samples per second, 17275 data bytes, wav, and converted them to 8-bit.
Using sox and the normally used line: "sox -V in.wav out.raw" gives me on-screen output which is quite similiar to that found in Chris Double's tutorial, only replace his sample rate with my sample rate and also replace his sample's length by my own. One more thing is listed: the amount of samples per channel (which is equal to my sample rate).
Link to the tutorial I was refering to: http://www.double.co.nz/nintendo_ds/nds_develop4.html
When I put the created raw files in my data-folder, add them as I did with the sample sounds, change the code to reflect the samples per seconds and sorts, and then after compiling try to play them... it sounds like complete rubbish.
Snippet of code to play one of the new samples:
startSound(22050, snd_drumbeat_raw, snd_drumbeat_raw_size, channel, 127, 64, 1);
So, is there a limit to maybe the sample rate? Did I exceed that limit? Is my conversion using sox just rubbish? *shrugs*
I've uploaded the drumbeat wav-file, so you people can have a look at it. It plays alright in Windows Media Player, and I can't see sox having trouble converting it, but on the DS it just doesn't play properly. Please help me out on this one.
Link to the uploaded drumbeat wav: http://www.few.vu.nl/~ssstolk/temp/snd_drumbeat.wav
Last edited by Dark Knight ez on Wed May 17, 2006 10:18 am; edited 1 time in total
Now, I've created some new samples... 1 channel, 22050 samples per second, 17275 data bytes, wav, and converted them to 8-bit.
Using sox and the normally used line: "sox -V in.wav out.raw" gives me on-screen output which is quite similiar to that found in Chris Double's tutorial, only replace his sample rate with my sample rate and also replace his sample's length by my own. One more thing is listed: the amount of samples per channel (which is equal to my sample rate).
Link to the tutorial I was refering to: http://www.double.co.nz/nintendo_ds/nds_develop4.html
When I put the created raw files in my data-folder, add them as I did with the sample sounds, change the code to reflect the samples per seconds and sorts, and then after compiling try to play them... it sounds like complete rubbish.
Snippet of code to play one of the new samples:
startSound(22050, snd_drumbeat_raw, snd_drumbeat_raw_size, channel, 127, 64, 1);
So, is there a limit to maybe the sample rate? Did I exceed that limit? Is my conversion using sox just rubbish? *shrugs*
I've uploaded the drumbeat wav-file, so you people can have a look at it. It plays alright in Windows Media Player, and I can't see sox having trouble converting it, but on the DS it just doesn't play properly. Please help me out on this one.
Link to the uploaded drumbeat wav: http://www.few.vu.nl/~ssstolk/temp/snd_drumbeat.wav
Last edited by Dark Knight ez on Wed May 17, 2006 10:18 am; edited 1 time in total