Author Topic: MCI library, (WIN32), All multimedia, Play, Pause, Resume, Stop, Volume  (Read 10135 times)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1635
  • Particle Hawk
    • View Profile
Quote
GP2x audio specs:
2 Channel Stereo(L+R)
Frequency Response 20Hz~20KHz
Sampling Rate 16bit/8~48KHz
Supported Formats MP3, OGG

GP32 audio specs:
2 Channel Stereo(L+R)
44.1 KHz 16-bit stereo sound


16 bit is the specs, but you have to make sure the frequency is 8~48khz

I would start with the gp32 specs for compatibility:

mp3, 44.1khz 16bit
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline gp2xboyuk

  • Mc. Print
  • *
  • Posts: 13
    • View Profile
It says this attachment was deleted by Admin, is there any reason? I could do with better control of audio than normal basic commands and this library looked perfect.

Offline Snoopy

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile
Hi gp2xboyuk,

Why do you need this (old) library?
The standard audio functions of GLBasic are now sufficient (only 3D is missing).
You can play wav, ogg, midi, mp3, ... and of course, multiplatform, not like this library.

Offline gp2xboyuk

  • Mc. Print
  • *
  • Posts: 13
    • View Profile
Standard GLBasic functions don't let you write apps, as there is no pause/play, or jumping to a certain point in mp3 so can't code an MP3 player or audiobook player etc etc
Also even for games it's nice to be able to have more advanced code to have music fading or changing depeding on zones or what is happening, all in one file and being able to jump to certain points, fade betwen parts etc so no fps drop whilst loading another mp3.
Mainly though as I say, I want to code an MP3 player :D
Tis library really looks to be essential for those not just wanting a gaming language, I always think of GLBasic as being ideal for coding applications.

Offline Snoopy

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile
Ah ok, I understand.
The best thing to do would be to create a wrapper for a library of sounds like http://www.portaudio.com/, because it's a cross-platform library.
« Last Edit: 2019-May-31 by Snoopy »

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1635
  • Particle Hawk
    • View Profile
Quote
The best thing to do would be to create a wrapper for a library of sounds like http://www.portaudio.com/, because it's a cross-platform library.

Strange, i didn't delete it. :blink:

Snoopy is correct, MCI is win32 only, and is not compatible with anything except windows.


Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1635
  • Particle Hawk
    • View Profile
BTW 3d sound is not "missing", it is something you need to implement with orientations and positions in 3d.
This might be a snippet i work on in the future.

In theory, this algorithm will consist of inputs for; a receiving position, a source position, and a pointto orientation, and general volume.

The output will be a "balance" and "loudness", which is derived from left/right/forward/backward/distance relative 3d positions.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Snoopy

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile
If we have to program them, it means they are missing.
I know something about it because I programmed it for one of my 3D games (and it was not so easy). In addition, it must be fast and multi-platform.
My routine was not 100% complete but was sufficient at the time.

Good Luck Hemlos !  =D ;)