Could someone confirm me that at the moment there isn't any homebrew that supports audio playback?
smea
Of the things I've tried, which isn't much so far, blargSNES has sound, and my own HCGE does also, both running under Ninjhax. Accounting for posts that came up while I was writing this, Ninjhax only lacks sound on New 3DS; it's fine on the regular 3DS
As you mentioned in an earlier post, I based my code on the mic example
From what I can tell, blargSNES only has mono sound, no stereo, and since I couldn't find any information on panning or multiple output channels on a single mixing channel, nor could I accomplish anything with the two "unknown" parameters to CSND_playsound, HCGE also uses mono sound. If there is a method for outputting separate left/right on a single mix channel, or panning a mix channel entirely left or right, I'd certainly like to know about it
I've also come across an issue that I think relates to a question someone else asked earlier in this thread too - it seems that using CSND_LOOP_ENABLE doesn't actually work. At least, when I tried using it at startup and later manipulating the buffer it used, I was getting no sound output
Because I couldn't find any information on a callback function that triggers when the buffer is empty, or a way to determine the playback position of the buffer, and because CSND_LOOP_ENABLE didn't seem to work for me, what I ended up having to do was, given that I use VSYNC to lock HCGE to a 60fps rate, on every frame - Try to fill the audio buffer with enough data to account for 1/60th of a second, and make a new call to CSND_playsound with CSND_LOOP_DISABLE. The result isn't fantastic (it's slightly jittery and there's noticeable crackling), but it does provide continuous sound output
If you don't need to do your own sound mixing via software like I do, though, you'd probably get better results just feeding individual sounds to individual hardware channels by calling CSND_playsound with a different channel any time you needed to play a sound effect or start your music. However, your sound data would have to be loaded uncompressed in its entirety into a buffer, and the format would have to correspond with whichever setting you used for CSND_playsound. Also, for looping music, you'd probably have to use the playback length in time to set up a timer and make another CSND_playsound call to start it over, unless you happen to get CSND_LOOP_ENABLE to work. This, of course, probably wouldn't have a seamless repeat
As for actually loading the sound, you'd just create a regular array in RAM and fill it with the sound data you want to play
While I'm posting, though, I'd like to pose some questions directly -
Does CSND_LOOP_ENABLE actually ever work, and are there some known specific scenarios in which it wouldn't that someone can explain?
Is there a known way to pan a hardware channel to the left or right, or to cause a single hardware channel to send different output to the left and right? If so, how is that done?
Is there a way to receive a signal when CSND_playsound is finished and respond to it immediately, or, is there a way to determine the playback position within the data after a CSND_playsound call is made? If so, how?
Is it possible at this point to use svcCreateThread to offload software sound mixing to the other processor core, and could someone explain its usage?