Go back to using the RageSound_QT1 class since RageSound_QT is broken.

This commit is contained in:
Steve Checkoway
2003-08-11 08:55:34 +00:00
parent 99c5923839
commit 5ba3bb1e30
4 changed files with 22 additions and 6 deletions
@@ -46,7 +46,6 @@ typedef struct soundInfo
static short dataRefIndices[4];
static SoundDescriptionHandle sndDescHdl;
//void soundInfo::DisposeSampleReferences(Media media, short index)
void DisposeSampleReferences(Media media, short index)
{
LockMutex L(SOUNDMAN->lock);
@@ -133,11 +132,10 @@ static void CallBack(QTCallBack cb, long refCon)
EndMediaEdits(media);
err = GetMoviesError();
TEST_ERR(err, AddMediaSample);
CHECKPOINT;
InsertMediaIntoTrack(track, -1, tv, samples, 0x00010000);
CHECKPOINT;
err = InsertMediaIntoTrack(track, -1, tv, samples, 1L<<16);
TEST_ERR(err, InsertMediaIntoTrack);
if (++dataRefIndices[3] > 3)
if (++dataRefIndices[3] >= 3)
{
SetMovieActiveSegment(movie, (dataRefIndices[3] - 2) * samples, twicesamples);
DisposeSampleReferences(media, dataRefIndices[3] % 3);
@@ -162,6 +160,9 @@ static void CallBack(QTCallBack cb, long refCon)
RageSound_QT::RageSound_QT()
{
#if 1
RageException::ThrowNonfatal("Class not finished.");
#endif
lastPos = 0;
bzero(dataRefIndices, 8);
@@ -204,6 +205,17 @@ RageSound_QT::~RageSound_QT()
s->snd->StopPlaying();
sounds.pop_back();
}
StopMovie(movie);
Media media = GetTrackMedia(track);
if (media)
{
DisposeSampleReferences(media, 0);
DisposeSampleReferences(media, 1);
DisposeSampleReferences(media, 2);
}
DisposeMovieTrack(track);
DisposeMovie(movie);
DisposeHandle(Handle(sndDescHdl));
}
void RageSound_QT::StartMixing(RageSound *snd)
+3
View File
@@ -78,6 +78,9 @@ RageSoundDriver *MakeRageSoundDriver(CString drivers)
#endif
#ifdef RAGE_SOUND_QT
if(!DriversToTry[i].CompareNoCase("QT")) ret = new RageSound_QT;
#endif
#ifdef RAGE_SOUND_QT1
if(!DriversToTry[i].CompareNoCase("QT1")) ret = new RageSound_QT1;
#endif
if(!DriversToTry[i].CompareNoCase("Null")) ret = new RageSound_Null;
if( !ret )
+1 -1
View File
@@ -26,7 +26,7 @@ RageSoundDriver *MakeRageSoundDriver(CString drivers);
#if defined(LINUX)
#define DEFAULT_SOUND_DRIVER_LIST "ALSA9,OSS,Null"
#elif defined(DARWIN)
#define DEFAULT_SOUND_DRIVER_LIST "QT"
#define DEFAULT_SOUND_DRIVER_LIST "QT,QT1"
#elif defined(_WINDOWS)
#define DEFAULT_SOUND_DRIVER_LIST "DirectSound,DirectSound-sw,WaveOut"
#elif defined(_XBOX)
+1
View File
@@ -10,6 +10,7 @@
*
*/
#include "Sound/RageSoundDriver_QT1.h"
#include "Sound/RageSoundDriver_QT.h"
#include "LoadingWindow/LoadingWindow_Cocoa.h"
#include "ErrorDialog/ErrorDialog_darwin.h"