Commit Graph

118 Commits

Author SHA1 Message Date
Mahyar Koshkouei
5b1677d003 Fix music not playing but not stopped
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-19 20:15:19 +00:00
Mahyar Koshkouei
0dc4103e88 Update README.md 2017-02-15 18:53:48 +00:00
Mahyar Koshkouei
693c9e7a9d Merge branch 'errHandling' 2017-02-15 17:28:02 +00:00
Mahyar Koshkouei
ae4b713bf6 Add new key mappings
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-15 17:25:02 +00:00
Mahyar Koshkouei
59688aaf0e Remove error on going up directory
Removed an error that would briefly appear on the screen if the user
were to attempt to change to the above directory whilst being in the
root directory.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-15 16:53:33 +00:00
Mahyar Koshkouei
073b507118 Browse files with Left & Right
Added feature to browse a folder with Left & Right buttons to skip over
half a screens worth of files (13 files).

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-15 16:34:50 +00:00
Mahyar Koshkouei
02746ec1d0 Fix playback bug & don't stop on every file select
Fixed a bug where ctrmus would freeze after selecting an unsupported
file.
Fixed a bug whereby selecting an unsupported file would stop playback.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-15 16:03:37 +00:00
Mahyar Koshkouei
825db2f713 Fix build warnings
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-15 15:29:08 +00:00
Mahyar Koshkouei
bd03f3c4c0 Merge branch 'threads' 2017-02-14 22:53:17 +00:00
Mahyar Koshkouei
65bb01ee72 Add missing function headers
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 22:45:18 +00:00
Mahyar Koshkouei
295edd06f0 Fix segfault on exit
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 17:58:21 +00:00
Mahyar Koshkouei
b7f3a70406 Remove header order requirement and debug
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 17:34:48 +00:00
Mahyar Koshkouei
711864cfa9 Fix error handling
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 17:00:15 +00:00
Mahyar Koshkouei
984192eebe Improve error handling
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 17:00:15 +00:00
Mahyar Koshkouei
3878bf4e23 Permission to use audio granted
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 17:00:15 +00:00
Mahyar Koshkouei
438ddee864 Add audio licence
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 17:00:15 +00:00
Mahyar Koshkouei
d3831f84d4 Change banner & sound
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-14 17:00:15 +00:00
Mahyar Koshkouei
675ca00335 Permission to use audio granted
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-12 23:12:39 +00:00
Mahyar Koshkouei
bc2eac4591 Add audio licence
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-12 15:58:12 +00:00
Mahyar Koshkouei
5763c44c57 Change banner & sound
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-11 16:22:21 +00:00
Mahyar Koshkouei
488a3d9357 Add pause/play display again
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-10 12:15:56 +00:00
Mahyar Koshkouei
5b433f2396 Add showControls, error handling, optimisations
Add a function to show button mappings using L + LEFT.
Added preliminary error handling that will be improved later to
determine playback issues.
Music is not stopped when an unsupported file is selected.
Some other minor modifications.

TODO:
Pause/play status does not show currently.
Obtain error status of playback thread.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-10 11:41:01 +00:00
Mahyar Koshkouei
888c4a1505 Minor fixes to improve thread safety
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-10 08:48:26 +00:00
Mahyar Koshkouei
3df3461027 Fix pausing
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-10 08:21:29 +00:00
Mahyar Koshkouei
a06e17a66a Put playback in separate thread (WIP)
Selecting a file is possible whilst music is playing.
Additionally fixes #19, an issue where the Home would not appear whilst
music is playing.

TODO:
Remove printf from playback module.
Fix pause and stop.
Display errors properly using errno.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-09 17:14:10 +00:00
Mahyar Koshkouei
4933cf554e Use relative file path
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-02-04 18:31:17 +00:00
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
59dd0361bc Update QR for release 2017-01-28 01:09:32 +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
25e3c166e8 Update README.md 2017-01-22 20:52:07 +00:00
Mahyar Koshkouei
8dd3ddd698 Create CONTRIBUTING.md 2017-01-22 20:46:42 +00:00
Mahyar Koshkouei
794551fd67 Update README.md
Update QR Code
2017-01-13 23:24:29 +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
9ea540803b Merge branch 'directory' 2017-01-13 22:49: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
dd2ec58dc0 Merge pull request #23 from deltabeard/github-fix
Add editorconfig to fix tab width on github
2017-01-12 19:27:35 +00:00
Mahyar Koshkouei
a51f2cdedf Add editorconfig to fix tab width on github
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
2017-01-12 19:25:51 +00:00
Mahyar Koshkouei
6866b7b1f3 Update QR code 2017-01-12 16:19:15 +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
2f23788036 Merge branch 'refactor' 2017-01-12 12:26:31 +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