Author Topic: playmusic function  (Read 1877 times)

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 343
  • Aoooooooo - the werewolves of London!
    • View Profile
playmusic function
« on: 2010-Jun-03 »
Got all motivated to make something, got part way into making it and then ran straight into a wall. (with spikes >_>) - I need to be able to specify a starting point for playmusic, not just 00:00. I know about FMOD and its wrapper, but my project is entirely for GP2X-Wiz. Is there an inline-C snippet I can use for picking a position, and also to put that position into a variable? It would be much appreciated. Thank you :)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1788
    • View Profile
    • Homepage
Re: playmusic function
« Reply #1 on: 2010-Jun-03 »
Yep, been there too. Would love to be able to specify a startingpoint when playing music or sound at all. :-)

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 343
  • Aoooooooo - the werewolves of London!
    • View Profile
Re: playmusic function
« Reply #2 on: 2010-Jun-03 »
*invokes the mighty Spirit of Gernot*
Help us, great one? D:

Offline yaKC

  • Mc. Print
  • *
  • Posts: 17
    • View Profile
Re: playmusic function
« Reply #3 on: 2010-Jun-05 »
can I just +1 this topic :) I'm another that's writing an integrated picture viewer/mp3 player/audiobook player although in my case for the GP2X F200, have a really nice UI so far but realise that without the ability to pause/unpause and select a start position for mp3's that sadly noone apart from myself will use my app, a shame after 3 months of work, I'm used to developing applications back in the day and really hope that GLBasic will allow me to not be tied to only games...

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 343
  • Aoooooooo - the werewolves of London!
    • View Profile
Re: playmusic function
« Reply #4 on: 2010-Jun-05 »
Well I am able to confirm that there is a major problem with the Playmusic function in the first place. I thought maybe I just somehow overloaded the Wiz with my media player's functions (they're modest...) but I was wrong. Make a simple app that just loads any ol' mp3 through playmusic, and make it print something like "Playing music" on the center of the screen. EVERY song works on Windows for me, including .Ogg with the proper codecs. Pop it onto the Wiz, and you're lucky if 1 in 5 songs play (at all.) I understand it may have something to do with the codecs in the firmware, but there seems to be a need to control audio at least on a very basic level. (I.E: We would like to specify a starting point or at least be able to load music and know it'll work...) Is there no way you can use portions of Mplayer specifically for gp2x, or even something like the well-documented SDL audio libraries? Obviously other apps on the GP2X-Wiz can make good use of the audio, I'd love to be able to do the same and I'm sure I'm not alone... Not that I'm not grateful for GLB. It's a lot of fun, I've just run into a wall with this audio issue :3

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10746
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: playmusic function
« Reply #5 on: 2010-Jun-07 »
I'm just using SDL_mixer as a dynamic library. It's GPH that don't seem to provide the correct player backends IMO.

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 343
  • Aoooooooo - the werewolves of London!
    • View Profile
Re: playmusic function
« Reply #6 on: 2010-Jun-09 »
Should I just use Wav/PCM? And if so, what sample rate works best? (I hate having to resort to a bulky format...)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10746
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: playmusic function
« Reply #7 on: 2010-Jun-09 »
Any will work. Usually I use 22 kHz and 16 bit.