No changes whatsoever, just remove trailing whitespace.
There are no real changes in this commit but it removes all trailing white space from our source files. This avoids problems when applying patches and making diffs and it would be nice to prevent it from reappearing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,23 +66,23 @@ class wxOSXSoundManagerSoundData : public wxSoundData
|
||||
public:
|
||||
wxOSXSoundManagerSoundData(const wxString& fileName);
|
||||
~wxOSXSoundManagerSoundData();
|
||||
|
||||
|
||||
virtual bool Play(unsigned flags);
|
||||
virtual void SoundTask();
|
||||
|
||||
void DoStop();
|
||||
protected:
|
||||
SndListHandle m_hSnd;
|
||||
SndListHandle m_hSnd;
|
||||
SndChannelPtr m_pSndChannel;
|
||||
};
|
||||
|
||||
wxOSXSoundManagerSoundData::wxOSXSoundManagerSoundData(const wxString& fileName) :
|
||||
m_pSndChannel(NULL)
|
||||
{
|
||||
{
|
||||
Str255 lpSnd ;
|
||||
|
||||
|
||||
wxMacStringToPascal( fileName , lpSnd ) ;
|
||||
|
||||
|
||||
m_hSnd = (SndListHandle) GetNamedResource('snd ', (const unsigned char *) lpSnd);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ void wxOSXSoundManagerSoundData::DoStop()
|
||||
m_pSndChannel = NULL;
|
||||
wxSound::SoundStopped(this);
|
||||
}
|
||||
|
||||
|
||||
if (IsMarkedForDeletion())
|
||||
delete this;
|
||||
}
|
||||
@@ -113,31 +113,31 @@ bool wxOSXSoundManagerSoundData::Play(unsigned flags)
|
||||
|
||||
SoundComponentData data;
|
||||
unsigned long numframes, offset;
|
||||
|
||||
|
||||
ParseSndHeader((SndListHandle)m_hSnd, &data, &numframes, &offset);
|
||||
|
||||
SndNewChannel(&m_pSndChannel, sampledSynth,
|
||||
initNoInterp
|
||||
+ (data.numChannels == 1 ? initMono : initStereo), NULL);
|
||||
|
||||
|
||||
if(SndPlay(m_pSndChannel, (SndListHandle) m_hSnd, flags & wxSOUND_ASYNC ? 1 : 0) != noErr)
|
||||
return false;
|
||||
|
||||
|
||||
if (flags & wxSOUND_ASYNC)
|
||||
CreateAndStartTimer();
|
||||
else
|
||||
DoStop();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxOSXSoundManagerSoundData::SoundTask()
|
||||
{
|
||||
SCStatus stat;
|
||||
|
||||
|
||||
if (SndChannelStatus((SndChannelPtr)m_pSndChannel, sizeof(SCStatus), &stat) != 0)
|
||||
Stop();
|
||||
|
||||
|
||||
//if the sound isn't playing anymore, see if it's looped,
|
||||
//and if so play it again, otherwise close things up
|
||||
if (stat.scChannelBusy == FALSE)
|
||||
@@ -178,7 +178,7 @@ void wxExitQT()
|
||||
//Note that ExitMovies() is not necessary, but
|
||||
//the docs are fuzzy on whether or not TerminateQTML is
|
||||
ExitMovies();
|
||||
|
||||
|
||||
#ifndef __WXMAC__
|
||||
TerminateQTML();
|
||||
#endif
|
||||
@@ -190,13 +190,13 @@ public:
|
||||
wxOSXQuickTimeSoundData(const wxString& fileName);
|
||||
wxOSXQuickTimeSoundData(int size, const wxByte* data);
|
||||
~wxOSXQuickTimeSoundData();
|
||||
|
||||
|
||||
virtual bool Play(unsigned flags);
|
||||
virtual void SoundTask();
|
||||
virtual void DoStop();
|
||||
protected:
|
||||
Movie m_movie;
|
||||
|
||||
|
||||
wxString m_sndname; //file path
|
||||
Handle m_soundHandle;
|
||||
};
|
||||
@@ -204,13 +204,13 @@ protected:
|
||||
|
||||
wxOSXQuickTimeSoundData::wxOSXQuickTimeSoundData(const wxString& fileName) :
|
||||
m_movie(NULL), m_soundHandle(NULL)
|
||||
{
|
||||
{
|
||||
m_sndname = fileName;
|
||||
}
|
||||
|
||||
wxOSXQuickTimeSoundData::wxOSXQuickTimeSoundData(int size, const wxByte* data) :
|
||||
m_movie(NULL)
|
||||
{
|
||||
{
|
||||
m_soundHandle = NewHandleClear((Size)size);
|
||||
BlockMove(data, *m_soundHandle, size);
|
||||
}
|
||||
@@ -225,9 +225,9 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags)
|
||||
{
|
||||
if ( m_movie )
|
||||
Stop();
|
||||
|
||||
|
||||
m_flags = flags;
|
||||
|
||||
|
||||
if (!wxInitQT())
|
||||
return false;
|
||||
|
||||
@@ -240,9 +240,9 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags)
|
||||
long outFlags = 0;
|
||||
OSErr err;
|
||||
ComponentResult result;
|
||||
|
||||
|
||||
err = PtrToHand(&m_soundHandle, &dataRef, sizeof(Handle));
|
||||
|
||||
|
||||
HLock(m_soundHandle);
|
||||
if (memcmp(&(*m_soundHandle)[8], "WAVE", 4) == 0)
|
||||
miComponent = OpenDefaultComponent(MovieImportType, kQTFileTypeWave);
|
||||
@@ -256,43 +256,43 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags)
|
||||
wxLogSysError(wxT("wxSound - Location in memory does not contain valid data"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
HUnlock(m_soundHandle);
|
||||
m_movie = NewMovie(0);
|
||||
|
||||
|
||||
result = MovieImportDataRef(miComponent, dataRef,
|
||||
HandleDataHandlerSubType, m_movie,
|
||||
nil, &targetTrack,
|
||||
nil, &addedDuration,
|
||||
movieImportCreateTrack, &outFlags);
|
||||
|
||||
|
||||
if (result != noErr)
|
||||
{
|
||||
wxLogSysError(wxString::Format(wxT("Couldn't import movie data\nError:%i"), (int)result));
|
||||
}
|
||||
|
||||
|
||||
SetMovieVolume(m_movie, kFullVolume);
|
||||
GoToBeginningOfMovie(m_movie);
|
||||
}
|
||||
else
|
||||
{
|
||||
OSErr err = noErr ;
|
||||
|
||||
|
||||
Handle dataRef = NULL;
|
||||
OSType dataRefType;
|
||||
|
||||
|
||||
err = QTNewDataReferenceFromFullPathCFString(wxCFStringRef(m_sndname,wxLocale::GetSystemEncoding()),
|
||||
(UInt32)kQTNativeDefaultPathStyle, 0, &dataRef, &dataRefType);
|
||||
|
||||
|
||||
wxASSERT(err == noErr);
|
||||
|
||||
|
||||
if (NULL != dataRef || err != noErr)
|
||||
{
|
||||
err = NewMovieFromDataRef( &m_movie, newMovieDontAskUnresolvedDataRefs , NULL, dataRef, dataRefType );
|
||||
wxASSERT(err == noErr);
|
||||
DisposeHandle(dataRef);
|
||||
}
|
||||
|
||||
|
||||
if (err != noErr)
|
||||
{
|
||||
wxLogSysError(
|
||||
@@ -301,10 +301,10 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Start the m_movie!
|
||||
StartMovie(m_movie);
|
||||
|
||||
|
||||
if (flags & wxSOUND_ASYNC)
|
||||
{
|
||||
CreateAndStartTimer();
|
||||
@@ -312,16 +312,16 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags)
|
||||
else
|
||||
{
|
||||
wxASSERT_MSG(!(flags & wxSOUND_LOOP), wxT("Can't loop and play syncronously at the same time"));
|
||||
|
||||
|
||||
//Play movie until it ends, then exit
|
||||
//Note that due to quicktime caching this may not always
|
||||
//work 100% correctly
|
||||
while (!IsMovieDone(m_movie))
|
||||
MoviesTask(m_movie, 1);
|
||||
|
||||
|
||||
DoStop();
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user