Commit Graph

68 Commits

Author SHA1 Message Date
Mahyar Koshkouei
6e7de0df65 Remove duplicate check
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-03 00:00:40 +00:00
Mahyar Koshkouei
14d2660977 Pause immediately
Fixed an issue whereby music was not paused instantly after user input,
but only after the currently playing buffer had finished playing.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-28 00:45:00 +00:00
Mahyar Koshkouei
31fee50aab Remove debugging for release
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-13 23:09:43 +00:00
Mahyar Koshkouei
932d10286c Merge branch 'mp3crc'
Fixes issue #24.
2017-01-13 22:57:19 +00:00
Mahyar Koshkouei
b7e5a3eefd Improve pointer speed
Press and hold for half a second to make the pointer go fast. Closes
issue #26.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-13 22:43:18 +00:00
Mahyar Koshkouei
11b16f1cd0 Fix file selector disappearing in large directory
This fixes issue #27.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-13 22:24:08 +00:00
Mahyar Koshkouei
bc2d8aae85 Testing mp3 files with error protection enabled
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-13 22:01:06 +00:00
Mahyar Koshkouei
e573b497eb Fix possible underflow issue
Pointed out by nedwill_3ds here:
https://www.reddit.com/r/3dshacks/comments/5nl1zi/wip_ctrmus_3ds_music_player/dcciivz/

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 21:30:08 +00:00
Mahyar Koshkouei
42cd727166 Remove one more debugging crap
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 14:58:38 +00:00
Mahyar Koshkouei
4b8ca4ab6f Remove debugging
Additionally increased the maximum size of the directory path to display
by a whopping 3 characters.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 12:11:38 +00:00
Mahyar Koshkouei
261bafd41d Drop Vorbis as planned feature
It's not as good as Opus. MP3 was added because it's popular, and Flac
provides a good lossless codec.
Vorbis can be added at a later date.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 12:00:59 +00:00
Mahyar Koshkouei
1c2203ffd0 Fix types in MP3 decoder
Using casts as a work around, and fixed type of one variable.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
42b3d50a16 Use dynamic buffer size for mp3 again
Additionally removed the old MP3 code, saving a massive 1KB from the
binary!

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
a1cd5363db Initial MP3 refactor
Using mpg123_outblock doesn't work correctly. Also assigning variables
to different types.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
fcf538031f Fix WAV playback
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
06ad05e332 Refactor WAV support
Only tested stereo WAV.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
d2b0ae540a Fix flac playback issue
Fixed an issue whereby flac files were playing twice as fast.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
5878bd0dcc Fix exit issue
Fixed an issue whereby the 3DS would crash when attempting to exit the
3DSX version of ctrmus.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
27ee6af2e1 Flac refactor WIP
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
cdf964f5b1 Change define to const in opus
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
644e501d6e Refactor Opus decoder
Created generic playback handler, first with Opus support. Other
decoders to follow. This is to remove duplicated code.

3DSX tested working with citra and N3DS.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 11:48:48 +00:00
Mahyar Koshkouei
5ca8e6cc65 Fix CIA causing instability
Fixed an issue whereby after exiting the ctrmus CIA application, the
user could not load another application.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-07 11:17:24 +00:00
Mahyar Koshkouei
3059bead6b Update README and minor changes for release
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-05 22:22:28 +00:00
Mahyar Koshkouei
0e6a86c551 Fix directory listing bugs
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-05 22:07:39 +00:00
Mahyar Koshkouei
28d2e8d594 Add MP3 Support
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-05 21:12:03 +00:00
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
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
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
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
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
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