Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Any static lib for playing mp3 from resource?

Featured Replies

Posted

Which static lib could play mp3 from resource WITHOUT extracting the mp3 file to hard disk?

C++ is prefered. Thank you buddies.

Edited by alaphate

http://www.fmod.org/index.php

At the very least, do a Google search first. This library should fulfil your needs, but i'm offering no guarantees.

HR,

Ghandi

  • Author

Thank you.

Fmod is very powerful, however, it uses fmod.dll.

Where could I get a static lib without dll dependencies?

Thanks.

This is not a static lib, it is a header file and i don't know if it fulfils your needs once again:

http://code4k.blogspot.com.au/2010/05/playing-mp3-in-c-using-plain-windows.html

Playing a MP3 in c++ using plain Windows API

While playing a mp3 is quite common in a demo, I have seen that most demo are often using 3rd party dlls like Bass or FMod to perform this simple task under windows. But if we want to get rid off this dependency, how can we achieve this with a plain windows API? What's the requirements to have a practical MP3Player for a demo?

Surprisingly, I was not able to find a simple code sample other the Internet that explain how to play a mp3 with Windows API, without using the too simple Windows Media Player API. Why WMP is not enough (not even talking about MCI - Media Control Interface which is even more basic than WMP)?

The usage is then pretty simple :

MP3Player player;

// Open the mp3 from a file...

player.OpenFromFile("your.mp3");

// or From a memory location!

player.OpenFromMemory(ptrToMP3Song, bytesLength);

player.Play();

while (...) {

// Do here your synchro in the demo using

...

double playerPositionInSeconds = player.GetPosition()

...

}

player.Close();

http://xoofx.com/upload/TestMP3Player.zip

HR,

Ghandi

  • Author

ghandi,

Awesome!

I appreciate your help very much.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.