Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

3DS PDN: Difference between revisions

From GameBrew
No edit summary
No edit summary
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox-3DS-Homebrews
| title = Background mp3 player
| title = Background MP3 player
| type = Media players
| type = Media players
| version = 2021
| version = 2021
Line 6: Line 6:
| licence = Mixed
| licence = Mixed
| author = hax0kartik
| author = hax0kartik
| website = https://gbatemp.net/threads/poc-developer-only-background-3ds-mp3-player.589949/
| website = https://gbatemp.net/threads/poc-developer-only-background-3ds-mp3-player.589949
| download = https://dlhb.gamebrew.org/3dshomebrew/Background-mp3-player-3DS.rar
| download = https://dlhb.gamebrew.org/3dshomebrew/Background-mp3-player-3DS.rar
| source = https://github.com/hax0kartik/3ds_pdn/tree/music-player
| source = https://github.com/hax0kartik/3ds_pdn/tree/music-player
}}
}}


'''For Developer Only'''
This is a POC (developer only) which can play MP3(s) while running games on your 3DS. Up until now, it was unknown whether this was possible, but as it turns out it is possible to do this. As anyone who has developed for 3DS before, should know that 3DS has two ways of playing audios, one through CSND and one through DSP. Apparently, it is possible to use CSND with modules to play music.


People for the longest time have wanted to play mp3(s) while games are running. Up until now, it was unknown whether this was possible, but as it turns out it is possible to do this.As anyone who has developed for 3ds before, should know that 3ds has two ways of playing audios, one through CSND and one through DSP. Apparently, it is possible to use CSND with modules to play music.
==User guide==
This is a 3DS PDN module rewrite and will play a MP3 off your sd card.  


Attached is a functional POC of the music player, it just plays a mp3 off your sd card. You need to put a mp3 file named as 'sound.mp3' on the root of your sd card and then enable game patching. I rewrote the PDN sysmodule, so now it spawns a thread in appcore for mp3 decoding and playing.
To do so you need to put a MP3 file named as sound.mp3 on the root of your sd card and then enable game patching. The PDN sysmodule will spawn a thread in appcore for MP3 decoding and playing.


The POC works (atleast on n3ds, for o3ds you might need to change appcore to syscore or change the prio) but not smoothly, every time the system/game spawns a new thread there is a small break in audio due to the audio thread freezing and there are constant "pop" sounds. My guess is the audio decoding and playing code will need soft-tuning(do note I'm not the best when it comes to audio stuff).
The POC works (atleast on N3DS, for O3DS you might need to change appcore to syscore or change the prio) but not smoothly, every time the system/game spawns a new thread there is a small break in audio due to the audio thread freezing and there are constant pop sounds. One possible reason is that the audio decoding and playing code will need soft-tuning.


==Notes:==
===Additional notes===
* Please remove patches for any other sysmodule before trying this as they can cause issues.
* Please remove patches for any other sysmodule before trying this as they can cause issues.
* It might be better if we do not use PDN for our purposes but create a entirely new sysmodule which will be launched by the homebrew audio player app.
* It might be better if we do not use PDN for our purposes but create a entirely new sysmodule which will be launched by the homebrew audio player app.
* 3ds sleep mode will be broken by this, you'll need to restart your console.
* 3DS sleep mode will be broken by this, you'll need to restart your console.
* On a n3ds, enabling "Clock + L2C" seems to make the code run a bit more smoother.
* On a N3DS, enabling Clock+L2C seems to make the code run a bit more smoother.


I hope the scene will be able to work its magic and fix the issues my POC has and then incorporate the code in other homebrew audio players!
==External links==
 
* GitHub - https://github.com/hax0kartik/3ds_pdn/tree/music-player
Also if you test this and if this works/does not work for you, please let me know!
* GBAtemp - https://gbatemp.net/threads/poc-developer-only-background-3ds-mp3-player.589949


[[Category:3DS homebrew applications]]
[[Category:3DS homebrew applications]]
[[Category:Homebrew media players on 3DS]]
[[Category:Homebrew media players on 3DS]]

Revision as of 00:23, 19 October 2021

Template:Infobox-3DS-Homebrews

This is a POC (developer only) which can play MP3(s) while running games on your 3DS. Up until now, it was unknown whether this was possible, but as it turns out it is possible to do this. As anyone who has developed for 3DS before, should know that 3DS has two ways of playing audios, one through CSND and one through DSP. Apparently, it is possible to use CSND with modules to play music.

User guide

This is a 3DS PDN module rewrite and will play a MP3 off your sd card.

To do so you need to put a MP3 file named as sound.mp3 on the root of your sd card and then enable game patching. The PDN sysmodule will spawn a thread in appcore for MP3 decoding and playing.

The POC works (atleast on N3DS, for O3DS you might need to change appcore to syscore or change the prio) but not smoothly, every time the system/game spawns a new thread there is a small break in audio due to the audio thread freezing and there are constant pop sounds. One possible reason is that the audio decoding and playing code will need soft-tuning.

Additional notes

  • Please remove patches for any other sysmodule before trying this as they can cause issues.
  • It might be better if we do not use PDN for our purposes but create a entirely new sysmodule which will be launched by the homebrew audio player app.
  • 3DS sleep mode will be broken by this, you'll need to restart your console.
  • On a N3DS, enabling Clock+L2C seems to make the code run a bit more smoother.

External links

Advertising: