]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/sound_osx.cpp
Workaround for #15404: wxRichTextCtrl: caret does not disappear when focus is lost...
[wxWidgets.git] / src / osx / sound_osx.cpp
index 1155660e46ddb01ae0e634760927b6fb7f7ca83a..8543b2c06dbc75bdd96e1b6e60b1c467331e64a5 100644 (file)
@@ -2,9 +2,8 @@
 // Name:        src/osx/sound_osx.cpp
 // Purpose:     wxSound class common osx code
 // Author:      Stefan Csomor
-// Modified by: 
+// Modified by:
 // Created:     2009-09-01
-// RCS-ID:      $Id: sound.cpp 61475 2009-07-20 16:47:54Z VZ $
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -35,20 +34,20 @@ public:
     : m_sound(snd)
     {
     }
-    
+
     virtual ~wxSoundTimer()
     {
         Stop();
         if (m_sound)
             m_sound->DoStop();
     }
-    
+
     void Notify()
     {
         if (m_sound)
             m_sound->SoundTask();
     }
-    
+
 protected:
     wxSoundData* m_sound;
 };
@@ -73,11 +72,7 @@ void wxSoundData::MarkForDeletion()
 void wxSoundData::Stop()
 {
     DoStop();
-    if ( m_pTimer )
-    {
-        delete m_pTimer;
-        m_pTimer = NULL;
-    }
+    wxDELETE(m_pTimer);
 }
 
 //Time between timer calls
@@ -94,7 +89,7 @@ void wxSoundData::CreateAndStartTimer()
     m_pTimer->Start(MOVIE_DELAY, wxTIMER_CONTINUOUS);
 }
 
-wxSound::wxSound() 
+wxSound::wxSound()
 {
     Init();
 }
@@ -105,7 +100,7 @@ wxSound::wxSound(const wxString& sFileName, bool isResource)
     Create(sFileName, isResource);
 }
 
-wxSound::wxSound(int size, const wxByte* data)
+wxSound::wxSound(size_t size, const void* data)
 {
     Init();
     Create( size, data );
@@ -126,7 +121,7 @@ wxSound::~wxSound()
             break;
         }
     }
-    
+
     if (isPlaying)
         m_data->MarkForDeletion();
     else
@@ -146,7 +141,7 @@ bool wxSound::DoPlay(unsigned flags) const
         if ( !m_data->Play(flags) )
             s_soundsPlaying.pop_back();
     }
-    
+
     return false;
 }
 
@@ -170,7 +165,7 @@ void wxSound::SoundStopped(const wxSoundData* data)
     for ( wxVector<wxSoundData*>::iterator s = s_soundsPlaying.begin();
          s != s_soundsPlaying.end(); ++s )
     {
-        if ( (*s) == data ) 
+        if ( (*s) == data )
         {
             s_soundsPlaying.erase(s);
             break;