[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.9,1.10 mixer.h,1.6,1.7
James Brown
ender at users.sourceforge.net
Mon Apr 22 01:33:07 CEST 2002
Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv29051/sound
Modified Files:
mixer.cpp mixer.h
Log Message:
Add voice channel tracking to stop script race in BumpusVille VR.
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** mixer.cpp 21 Apr 2002 17:46:42 -0000 1.9
--- mixer.cpp 22 Apr 2002 08:16:16 -0000 1.10
***************
*** 39,43 ****
}
! void SoundMixer::insert(PlayingSoundHandle *handle, Channel *chan) {
for(int i=0; i!=NUM_CHANNELS; i++) {
if (_channels[i] == NULL) {
--- 39,43 ----
}
! int SoundMixer::insert(PlayingSoundHandle *handle, Channel *chan) {
for(int i=0; i!=NUM_CHANNELS; i++) {
if (_channels[i] == NULL) {
***************
*** 46,50 ****
if (handle)
*handle = i + 1;
! return;
}
}
--- 46,50 ----
if (handle)
*handle = i + 1;
! return i;
}
}
***************
*** 52,60 ****
warning("SoundMixer::insert out of mixer slots");
chan->destroy();
}
! void SoundMixer::play_raw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags) {
! insert(handle, new Channel_RAW(this, sound, size, rate, flags));
}
--- 52,62 ----
warning("SoundMixer::insert out of mixer slots");
chan->destroy();
+
+ return -1;
}
! int SoundMixer::play_raw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags) {
! return insert(handle, new Channel_RAW(this, sound, size, rate, flags));
}
***************
*** 203,208 ****
}
! if (!_size)
destroy();
}
--- 205,211 ----
}
! if (_size < 1)
destroy();
+
}
Index: mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mixer.h 21 Apr 2002 17:46:42 -0000 1.6
--- mixer.h 22 Apr 2002 08:16:16 -0000 1.7
***************
*** 116,120 ****
PlayingSoundHandle *_handles[NUM_CHANNELS];
! void insert(PlayingSoundHandle *handle, Channel *chan);
void uninsert(Channel *chan);
--- 116,120 ----
PlayingSoundHandle *_handles[NUM_CHANNELS];
! int insert(PlayingSoundHandle *handle, Channel *chan);
void uninsert(Channel *chan);
***************
*** 125,129 ****
FLAG_FILE = 4, /* sound is a FILE * that's read from */
};
! void play_raw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags);
#ifdef COMPRESSED_SOUND_FILE
void play_mp3(PlayingSoundHandle *handle, void *sound, uint32 size, byte flags);
--- 125,129 ----
FLAG_FILE = 4, /* sound is a FILE * that's read from */
};
! int play_raw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags);
#ifdef COMPRESSED_SOUND_FILE
void play_mp3(PlayingSoundHandle *handle, void *sound, uint32 size, byte flags);
More information about the Scummvm-git-logs
mailing list