fixing and completing iPhone sound
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
*/
|
||||
|
||||
#define wxOSX_USE_QUICKTIME 1
|
||||
#define wXOSX_USE_AUDIOTOOLBOX 0
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 0
|
||||
|
||||
#endif
|
||||
/* _WX_OSX_CARBON_CHKCONF_H_ */
|
||||
|
@@ -46,10 +46,10 @@
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
#define wxOSX_USE_QUICKTIME 0
|
||||
#define wXOSX_USE_AUDIOTOOLBOX 1
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 1
|
||||
#else // platform < 10.5
|
||||
#define wxOSX_USE_QUICKTIME 1
|
||||
#define wXOSX_USE_AUDIOTOOLBOX 0
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#define wxHAS_OPENGL_ES
|
||||
|
||||
#define wxOSX_USE_QUICKTIME 0
|
||||
#define wXOSX_USE_AUDIOTOOLBOX 1
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 1
|
||||
|
||||
/*
|
||||
* turning off capabilities that don't work under iphone yet
|
||||
|
@@ -14,10 +14,10 @@
|
||||
|
||||
#if wxUSE_SOUND
|
||||
|
||||
#if wxOSX_USE_AUDIOTOOLBOX
|
||||
|
||||
#include "wx/sound.h"
|
||||
|
||||
#if wxOSX_USE_AUDIOTOOLBOX
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
@@ -28,6 +28,10 @@
|
||||
|
||||
#include "wx/file.h"
|
||||
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
#include <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
class wxOSXAudioToolboxSoundData : public wxSoundData
|
||||
{
|
||||
public:
|
||||
@@ -87,7 +91,7 @@ void wxOSXAudioToolboxSoundData::DoStop()
|
||||
}
|
||||
}
|
||||
|
||||
bool wxOSXAudioToolboxSoundData::DoPlay(unsigned flags) const
|
||||
bool wxOSXAudioToolboxSoundData::Play(unsigned flags)
|
||||
{
|
||||
Stop();
|
||||
|
||||
@@ -115,6 +119,21 @@ bool wxOSXAudioToolboxSoundData::DoPlay(unsigned flags) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxSound::Create(int size, const wxByte* data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxSound::Create(const wxString& fileName, bool isResource)
|
||||
{
|
||||
if ( isResource )
|
||||
return false;
|
||||
|
||||
|
||||
m_data = new wxOSXAudioToolboxSoundData(fileName);
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // wxOSX_USE_AUDIOTOOLBOX
|
||||
|
||||
#endif //wxUSE_SOUND
|
||||
|
Reference in New Issue
Block a user