206 Commits

Author SHA1 Message Date
Mahyar Koshkouei
b60cec86b9 Player fixes and file selector
Fixed an issue where the first part of a WAV file would not be played.
Fixed an issue where a random part of the WAV file would play after the
file had finished playing.
Fixed an issue where the audio file was not closed after it had finished
playing.
Fixed an issue whereby the current file would continue playing after
returning to the main menu.

Added basic file selector to select different WAV audio files in the
/audio/ folder.
Now using two buffers to play audio. Whilst one buffer is playing, the
other buffer is played. Buffer size set to a magic value of 1MiB.

Tested on New 3DS. Currently working with 48000Hz, 16 Bit WAV files.

TODO (in order):
Refactor duplicate code.
Automatically detect WAV sampling rate, resolution, etc.
Remove debug messages.
Add file browser.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-25 23:30:50 +01:00
Mahyar Koshkouei
69cd402df1 goto cleanup and define
Removed pointless goto.
Made use of BUFFER_SIZE define.

Untested.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-24 23:08:22 +01:00
Mahyar Koshkouei
7fe6bc50ac Remove some debug
Still a lot of debug remaining. Removed some pointless lines in the
meantime.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-24 23:03:47 +01:00
Mahyar Koshkouei
e9a618b940 Load large WAV files
Large WAV files can now be played. Tested working with 77MiB WAV files.

Known issues:
- First kilobytes of WAV file isn't played.
- Screen doesn't turn on after 3DS placed in sleep mode.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-24 23:00:32 +01:00
Mahyar Koshkouei
020ade0934 Create initial file structure
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-24 11:52:11 +01:00
Mahyar Koshkouei
c9729ed113 Initial commit 2016-10-23 19:40:56 +01:00