perhaps a memory problem??

Previous topic - Next topic

Darmakwolf

I am working on a simple music player for GP2X-Wiz called Bit Player. In Windows, it works like a charm without a hitch. On the Wiz, it works the same except that some MP3s decide not to play (while others do,) and after playing some songs for a while it will lock up alltogether upon selecting a song. I even tried stopmusic before playing another song, and I get the same result. I have attached the source because I'm a little frustrated with trying to get it to work, and I'm hoping someone could point out the problem. It took a long time to get the file selector working this way!
note: music files go in the Music folder. up/down arrow on windows will select a file up or down, and X on the keyboard corresponds to B on the Wiz.(page up/down for volume. ) Is this perhaps a glitch in playmusic on the wiz platform??
[NOTE: the player currently REQUIRES at least 13 songs in the Music folder. This is due to the way the music list works, and will be fixed soon. just throw 13+ songs in there and it'll work :) ]

[attachment deleted by admin]

Darmakwolf

I will give it a try later, thank you for pointing that out! Maybe it just freaks the Gp2x out and not Windows. I hope this fixes it :)

Darmakwolf

strange - it wasn't crashing on Win7. Anyways - I altered the code to now accept less than 14 files. (It crashes when there's NO music in the folder, but I will deal with that next.) Working fine in win7, even with one MP3. With several hundred, I can scroll around and play any song as long as I want to, and on the GP2X-Wiz I can play MAYBE 10, and it'll freeze. whyyy ><

[attachment deleted by admin]

Darmakwolf

Okay, update I guess. I was able to stop the application from crashing altogether by setting the Wiz clock to 766 Mhz in the program itself. This does allow it to stay stable, however, not all songs play at the correct speed! It's really strange. Some songs play extremely slow while others play normally. I'm perplexed...

Darmakwolf

No one has a Wiz they can pop my program onto to see what I'm talking about? I attempted to remove parts of the code which could be causing an audio-playing bottleneck, and nothing significant happened. I tried capping the FPS to 10, then 5. All this did was reduce the music choppyness by a little on some songs, but made the app hardly responsive. ( Still had the weird issues with playing.)  Is it completely impossible to use Inline C to link to some kind of audio library for Linux? I'm just really upset that I've had audio issues with every program I've made for Wiz so far besides one. It's my favorite handheld. I understand that the iPod is the system-of-choice for developers because they make money off of it (because everyone, their grandma and their dog has an iPod.) but I program for enjoyment and to better myself as a programmer. Someone commented before stating that most GLBasic users would be happy if all support except ipod were removed. I disagree to the fullest extent possible - I love my GP2X.

Anyways - I got a little off-topic. Really what I'm looking for is some solid audio playback. Even .OGG, which should (in my opinion,) have better compatibility than mp3 on a linux handheld, stutters in any app I make which has something going on in the foreground, such as a simple game. Any suggestions??
(Just for reference, it's not my SD card. I have a Class 6 SDHC that outperforms many common brands, and I have tried the app on 4 sd cards. Same result...)

Kitty Hello

very strange. If it's just a player, try limitfps 30 or so...

Darmakwolf

30fps actually causes it to freeze on nearly ANY song. Only one played successfully when set to 30 fps. All others are crashing completely or kicking me to the gph launcher. I have tried a vast array of MP3 types/encodings, most do not play at all! D: