New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Android, Wii & 3DS toolchains #915
Conversation
decoded*=sizeof(int32_t); | ||
#endif | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChristianBreitwieser
Does this look okay for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ghabry
Yeah it does, but why not drop int32_t altogether (no ifdef) and use int instead for all architectures.
The interface of libsndfile uses int anyway. sf_count_t sf_read_int (SNDFILE *sndfile, int *ptr, sf_count_t items);
I just used int32_t for clarification (and to stay uniform with the int16_t above.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, was just unsure about the code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are libsndfile and speexdsp needed for? |
|
Are they used internally by Audio Decoder? Cause if not, i think they're both unused on 3DS port. |
Yes, they will be used if available. There is a file magic check in |
As carsten said ^^. libsndfile makes our AudioDecoders more complete (only OGG missing, patches welcome), this replaces your WAV code in the near future (sorry). This lib supports many different WAV formats, like ADPCM. This will also make the Wii port much more enjoyable, because SDL for Wii was totally broken (no audio resampling, everything played at fixed frequency), this got all solved for all platforms with 2 extra classes 👍 |
btw. the ogg vorbis music decoder is almost finished: 45561e0. |
libsndfile appears to be totally broken on Wii :( |
Tested on Android: libsndfile, speex and ogg work perfect. On Wii Ogg+speex work only 3DS has test pending for all |
@@ -180,7 +197,13 @@ SdlAudio::SdlAudio() : | |||
if (Mix_OpenAudioDevice(frequency, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 2048, | |||
NULL, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE) < 0) | |||
#else | |||
if (Mix_OpenAudio(frequency, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 2048) < 0) | |||
# ifdef WORDS_BIGENDIAN | |||
int format = AUDIO_S16MSB; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least for SDL Wii MIX_DEFAULT_FORMAT = AUDIO_S16SYS = AUDIO_S16MSB
.
This should also be true for all "serious" SDL ports.
Still waiting for Wii-feedback. The 3DS build is confirmed totally broken, crashes after the EasyRPG logo when loading the file browser. Behaviour can't be reproduced in emulator :( |
I can confirm now, that all music + pitch change works on Wii. |
Because of the brokeness of the 3DS build I will remove all changes besides the ctrulib buildfix and handle the rest with an additional PR |
…ing to be Yume Nikki friendly
…SDL Wii which uses our own resampler now
I can confirm that audio works on Linux and Wii with the S16SYS setting. So this is ready 👍 |
Fixes #116
Fixes #859
Fixes #918
Adds
-DHAVE_LIBSNDFILE -DHAVE_LIBSPEEXDSP
Should solve all our WAV problems (SDL_mixer
.)I'm aware that the 3DS has a hardware resampler but tempo change is not possible with this one correctly because tempo is adjusted via the frequency and this fails when it gets to high.
Wiimote got SHIFT mapped on B (upon request)
Classic Controller got remapped to be Yume Nikki friendly (1, 3, 5 and 9), before the mapping was arbitrary.
Code got updated to build again with latest ctrulib.