added sfx/voice and few corrections

svn-id: r28286
This commit is contained in:
Paweł Kołodziejski 2007-07-29 11:21:12 +00:00
parent 395f244ba0
commit f8d28abdf9
2 changed files with 21 additions and 14 deletions

View file

@ -1227,7 +1227,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
getLine(ald, buffer, size);
sscanf(buffer, "%s", num_room);
strcat(num_room,".alg");
strcat(num_room, ".alg");
getLine(ald, buffer, size);
sscanf(buffer, "%d", &musica_room);
@ -3685,14 +3685,6 @@ void DrasculaEngine::para_grabar(char nom_game[]) {
fin_sound();
}
int DrasculaEngine::LookForFree() {
delay(10);
// TODO GAME_Poll(gamev, 10);
//return(!SDEV_ChannelFree(gamev->EffectDev, 0));
delay(1000); // workround too much fast played sound
return 0;
}
void DrasculaEngine::OpenSSN(const char *Name, int Pause) {
MiVideoSSN = (byte *)malloc(64256);
GlobalSpeed = CLOCKS_PER_SEC / Pause;
@ -4856,15 +4848,15 @@ void DrasculaEngine::MusicFadeout() {
}
void DrasculaEngine::ctvd_end() {
//TODO
_mixer->stopHandle(_soundHandle);
}
void DrasculaEngine::ctvd_stop() {
//TODO
_mixer->stopHandle(_soundHandle);
}
void DrasculaEngine::ctvd_terminate() {
//TODO
// _mixer->stopHandle(_soundHandle);
}
void DrasculaEngine::ctvd_speaker(int flag) {}
@ -4872,7 +4864,16 @@ void DrasculaEngine::ctvd_speaker(int flag) {}
void DrasculaEngine::ctvd_output(Common::File *file_handle) {}
void DrasculaEngine::ctvd_init(int b) {
//TODO
int soundSize = sku->size();
byte *soundData = (byte *)malloc(soundSize);
sku->seek(32);
sku->read(soundData, soundSize);
_mixer->playRaw(Audio::Mixer::kPlainSoundType, &_soundHandle, soundData, soundSize - 64,
11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED);
}
int DrasculaEngine::LookForFree() {
return _mixer->isSoundHandleActive(_soundHandle);
}

View file

@ -37,6 +37,10 @@
#include "common/events.h"
#include "common/keyboard.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
#include "sound/voc.h"
#include "engines/engine.h"
namespace Drascula {
@ -350,6 +354,8 @@ public:
Common::Platform getPlatform() const;
void update_events();
Audio::SoundHandle _soundHandle;
void asigna_memoria();
void libera_memoria();
void carga_info();
@ -438,7 +444,7 @@ public:
int vb_x, sentido_vb, vb_se_mueve, frame_vb;
float nuevo_alto, nuevo_ancho;
int diferencia_x, diferencia_y;
int factor_red[201];
int factor_red[202];
int frame_piano;
int frame_borracho;
int frame_velas;