Playing music?

That’s the sound

This is the expected behavior? Sounds really bad.

I don’t know how it sounds of course at your side. Maybe try some games that play music?
For example this one: [Game]Matti’s Nightmare

On my pokitto this game sounds good.

Stil Background noise wen on the volume screen.
Sound seems way better then the sample code.
My speaker seems to be broken.

Can the aux do stereo sound?

What do you mean? Does the game sound good on your pokitto or not?

I am not sure but I don’t think so…

Yes, it sounds good but is streamed from sd card. How to play sound of sd card?

you can play music from sd card with [Tool]Xploritto (WIP) (only unsigned 8-bit mono at 11024 Hz).

Where are you downloading these .bins from?
I can’t find one on the repo @Hanski linked to…

I’m partly wondering if there’s a compiler problem at the root of this.

Huh, GitHub’s file finder is failing me then.

If I use the file finder to search for .bin I only get PokittoLib/Examples/Aquarium256/Aquarium256.bin showing up.

How to do that in code?

add this to My_settings.h

#define PROJ_ENABLE_SOUND 		1
#define PROJ_STREAMING_MUSIC 	1
#define PROJ_AUD_FREQ           11025

call this function to start playing a file

Pokitto::Sound::playMusicStream("path to file.raw",0);

to stop the playback

Pokitto::Sound::pauseMusicStream();
1 Like

You are faster than me…
I have also made an example.

3 Likes

Thank you @bl_ackrain and @sbmrgd.
With some trail and error i got my own files to work. There seems to be a file name length restriction.
Would it be possible to run load music and data from a folder directory

yes, i am using folders in [Game]Celeste classic and it work fine.

Pokitto::Sound::playMusicStream("Celeste/music/music0.raw", 0);

if you want to load data and music you will need to use SDFS library because PFFS can only open one file.

I had "SakuraWarsTest.raw" and that did not load but renaming file to "p1.raw" did work.
How to run music on SDFS?

to use SDFS for streaming you can add this line to My_settings.h

#define PROJ_SDFS_STREAMING         1
1 Like

PFFS does not support long file names, so it can’t be more than 8 characters long.

1 Like

Thanks, suspected something like that was up. Reason to use PFFS as default?
Mutliple file systems making this confusing

1 Like

I suppose it’s because PFFS occupies much less space in flash, leaving more room for game code.

3 Likes