first run through for sound on iOS platforms. Currently works only for simulator unless the music files are extracted from the zip file onto the filesystem.

This commit is contained in:
techdragon.nguyen@gmail.com
2012-02-03 11:23:27 +00:00
parent 52f2435c48
commit 78c08af9f5
8 changed files with 1546 additions and 14 deletions

View File

@@ -21,6 +21,7 @@
#ifdef ANDROID
#include <SLES/OpenSLES.h>
#include "SLES/OpenSLES_Android.h"
#elif defined USE_PHONON
#include <phonon/AudioOutput>
#include <phonon/MediaObject>
@@ -48,6 +49,8 @@
#endif
//------------------------------------------------------------------------------------------------
using namespace std;
#ifdef USE_PHONON
class JMusic : public QObject
{
@@ -69,6 +72,10 @@ public:
void seekAtTheBegining();
#elif defined (PSP)
JMP3* mTrack;
#elif defined (IOS)
std::string filename;
std::string key;
std::string ext;
#elif defined WITH_FMOD
FSOUND_SAMPLE* mTrack; // MP3 needed to be of "sample" type for FMOD, FMUSIC_MODULE is for MODs
#elif defined ANDROID
@@ -82,7 +89,7 @@ public:
};
//------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------
class JSample
{
public:
@@ -93,6 +100,12 @@ class JSample
#if defined (PSP)
WAVDATA *mSample;
#elif defined (IOS)
std::string filename;
std::string key;
std::string ext;
void* mSample;
#elif defined (WITH_FMOD)
FSOUND_SAMPLE *mSample;
#elif defined (USE_PHONON)