206 Commits

Author SHA1 Message Date
Mahyar Koshkouei
2456166647 Update README and limit pointer speed
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-02 11:41:41 +00:00
Mahyar Koshkouei
d0ce566512 Remove unused libraries
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-01 14:19:45 +00:00
Mahyar Koshkouei
4d6dec24a0 Merge branch 'directory' 2017-01-01 14:17:52 +00:00
Mahyar Koshkouei
ba680fb63a Cleanup
Removed some debugging code.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-01 14:11:40 +00:00
Mahyar Koshkouei
f7fa518294 Changes to file browser
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-01 13:58:36 +00:00
Mahyar Koshkouei
9920fd1ac3 Fix directory browsing
Only the first page of files can be browsed in the directory though.
The top screen is where the playlist will be displayed, but is currently
used for music playback info.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-31 19:47:37 +00:00
Mahyar Koshkouei
91b55285f2 Initial directory changes
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-31 19:47:37 +00:00
Mahyar Koshkouei
dec4618e5a Fix accessing cleared memory
Fixed a major bug whereby file names were being retrieved from a cleared
pointer (issue 9).

Tested working on n3DS.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-31 19:47:37 +00:00
Mahyar Koshkouei
19b96191de Fix accessing cleared memory
Fixed a major bug whereby file names were being retrieved from a cleared
pointer (issue 9).

Tested working on n3DS.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-30 18:31:18 +00:00
Mahyar Koshkouei
aa39c2f3fb Refactored WAV code in to its own file
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-29 21:15:19 +00:00
Mahyar Koshkouei
42b61ba7f0 Fix pause display
Fixed an issue where the "Paused" text would still be displayed after
un-pausing a WAV file.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-29 20:46:59 +00:00
Mahyar Koshkouei
40bb881172 Improve CIA creation
Fixed a bug where the CIA icon was blank.
Fixed automatic version number generation for the CIA.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-29 19:02:12 +00:00
Mahyar Koshkouei
7ce1771449 Add files for CIA creation
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-28 17:27:50 +00:00
Mahyar Koshkouei
ae78aee80b Update README.md 2016-12-28 15:23:05 +00:00
Mahyar Koshkouei
84795c3bf2 Update Readme
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-28 13:10:41 +00:00
Mahyar Koshkouei
56d5c7d760 Add working Opus file support
Opus files can now be played.
Fixed an issue where monophonic tracks were being played twice as slow.
Opus decodes to stereo always.
Additionally added ability to loop the file selector from 1 to the last
file when pressing down and vice versa.

There are known issues. Please see the issues page for them.

Tested working with:
196kbit Stereo Opus File
32kbit Stereo Opus File
96kbit Mono Opus File
8kbit Stereo Opus File

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-28 13:03:56 +00:00
Mahyar Koshkouei
3c99a80581 Preliminary Opus file support
Currently has noise issues and plays fast - not for use yet.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-27 22:37:24 +00:00
Mahyar Koshkouei
37ee6e2f58 Add check for Opus file type
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-27 18:00:32 +00:00
Mahyar Koshkouei
c12bf9eb82 Remove Opus example with actual function
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-27 17:37:00 +00:00
Mahyar Koshkouei
5e2af8be87 Renamed Opus dec
Additionally made very minor changes to fix 80 character line limit in
some places.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-27 16:43:45 +00:00
Mahyar Koshkouei
4290b64778 Update Readme
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-27 12:58:29 +00:00
Mahyar Koshkouei
e0401fee12 Merge branch 'flac' 2016-12-27 12:49:06 +00:00
Mahyar Koshkouei
914571aac7 Fix Flac playing
Fixed an issue whereby the size of the buffer was incorrect causing
malformed audio output when playing a flac music file.
Additionally removed some debugging code and old chaff.

Tested working with stereo and mono 16 bit flac files.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-27 12:46:16 +00:00
Mahyar Koshkouei
c769cf65dd Minor changes
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-26 15:18:58 +00:00
Mahyar Koshkouei
517f2e605b Fix file type error
Additionally changed compiler optimisation back to O3 and temporarily
use only a single buffer with flac decoding.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-26 13:49:58 +00:00
Mahyar Koshkouei
ee1f4bfe20 16-bit flac decoding and improve file type checker
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-26 12:58:01 +00:00
Mahyar Koshkouei
90622a974a Call decoder depending on file type
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 20:41:35 +00:00
Mahyar Koshkouei
b0a1eb8283 Add flac support
Not working properly due to decoding flac in to 32 bit buffer instead of
16 bit.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 20:25:26 +00:00
Mahyar Koshkouei
a6c43d6a7c Add flac lib
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:57:23 +00:00
Mahyar Koshkouei
70e920cec6 Minor changes to debug
Added text to show that playback is paused.
Still attempting to add Opus.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:54:21 +00:00
Mahyar Koshkouei
7e33638380 Attempting to play opus on the fly
This doesn't work yet.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:54:16 +00:00
Mahyar Koshkouei
2805088a4a Opus to Wav working example
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:53:40 +00:00
Mahyar Koshkouei
78a874f2c0 Add POC that converts Opus to Wav
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:53:40 +00:00
Mahyar Koshkouei
1f4b29912b Adding Opus
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:53:40 +00:00
Mahyar Koshkouei
1cd932be7b Add preliminary Opus file support
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:53:40 +00:00
Mahyar Koshkouei
6c43254b7e Add libopus to project
Use https://github.com/deltabeard/3ds_portlibs to obtain libopus.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-21 16:53:40 +00:00
Mahyar Koshkouei
ce38c691db Fix PCM16 being stored in unsigned array
Fixed an issue whereby signed PCM16 sample data was being stored in an
unsigned array. Sound quality doesn't seem to have been affected.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-11 11:40:51 +00:00
Mahyar Koshkouei
7a08c05e1a Minor change to buffer size
Set buffer size back to set value rather than bases on values obtained
from file.
Fixed some indentation and removed some old debugging chaff.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-04 13:29:54 +00:00
Mahyar Koshkouei
3c49a862c3 Fix replay last buffer issue
Fixed a bug whereby the last part of the file may be play twice.
Additionally changed the buffer size to the sample size of the wav file.
This is so that there is little delay when pausing.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-04 11:32:59 +00:00
Mahyar Koshkouei
ef6242a0d5 Update README.md 2016-12-04 10:15:31 +00:00
Mahyar Koshkouei
29b3031950 Merge branch 'ndsp' 2016-12-04 09:52:20 +00:00
Mahyar Koshkouei
d1902617ee Add pause/play support
Pressing A now pauses and plays the selected file.
Reduced buffer size from 1MiB to 16KiB.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-04 09:41:38 +00:00
Mahyar Koshkouei
462261e781 Change interpolation to polyphase
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-03 14:27:26 +00:00
Mahyar Koshkouei
d3df928cae Fix crash on fopen error
Fixed an issue whereby the return value of fopen was not checked for a
NULL pointer causing a crash. This error occurred when opening a file
with the character "é", when it was the first file opened when starting
the program.
Error messages now report the errno string.
Added preliminary stream support.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-03 13:57:29 +00:00
Mahyar Koshkouei
856034ad63 Many fixes
Now using dynamic allocation for file name.
Sleep mode disabled to allow playing of music whilst lid is closed via
headphones.
Fixed an issue where the 3DS screens would not appear when coming back
from sleep mode.
Fixed an issue where music may immediately stop playing after trying to
play it.
Music can now be listened to when the 3DS has its lid closed.
Fixed an issue whereby the number of sample in the buffer was
miscalculated.
Music can now be played by pressing the R button, even when the 3DS lid
is closed. Selecting a file still has to be done with the d-pad.

Tested working on new 3DS. Only the first 8MiB of a wav file is
currently played.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-12-03 00:14:17 +00:00
Mahyar Koshkouei
c31c872621 Use DSP instead of CSND
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-11-22 23:58:44 +00:00
Mahyar Koshkouei
c346f60f16 Add icon
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-11-21 21:44:40 +00:00
Mahyar Koshkouei
c05e4366f7 Disable 8bit WAV support
8 bit, and ADPCM wav files sound like garbage, so disabling it.
Changed directory to "MUSIC".
Minor changes to file selector.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-28 13:17:48 +01:00
Mahyar Koshkouei
fcc801e8ca Working release before Stereo support changes
Added work-around for stereo WAV files. Plays them twice as fast to
compensate for the fact the player currently only supporting monophonic
output. Stereo output will be added in the future.

WAV sampling rate, resolution, channels, etc is now automatically
detected. Note that 8bit WAV files sound horrible for some reason.

Note that PCM WAV files are supported, not compressed WAV files.

Tested working on n3DS and 3DS.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-28 11:55:37 +01:00
Mahyar Koshkouei
31ad76e541 Attempting to add Stereo
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2016-10-28 11:46:09 +01:00