mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Fixes for linux
This commit is contained in:
parent
61583be13a
commit
e8606c82af
@ -49,7 +49,7 @@ pset<FmodAudioManager *> FmodAudioManager::_all_managers;
|
|||||||
// Central dispatcher for audio errors.
|
// Central dispatcher for audio errors.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static void fmod_audio_errcheck(FMOD_RESULT result) {
|
void fmod_audio_errcheck(FMOD_RESULT result) {
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
audio_error("FMOD Error: "<< FMOD_ErrorString(result) );
|
audio_error("FMOD Error: "<< FMOD_ErrorString(result) );
|
||||||
}
|
}
|
||||||
|
@ -148,11 +148,11 @@ play() {
|
|||||||
// Description: When fmod finishes playing a sound, decrements the
|
// Description: When fmod finishes playing a sound, decrements the
|
||||||
// reference count of the associated FmodAudioSound.
|
// reference count of the associated FmodAudioSound.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
static FMOD_RESULT F_CALLBACK sound_end_callback(FMOD_CHANNEL * channel,
|
FMOD_RESULT F_CALLBACK sound_end_callback(FMOD_CHANNEL * channel,
|
||||||
FMOD_CHANNEL_CALLBACKTYPE type,
|
FMOD_CHANNEL_CALLBACKTYPE type,
|
||||||
int command,
|
int command,
|
||||||
unsigned int commanddata1,
|
unsigned int commanddata1,
|
||||||
unsigned int commanddata2) {
|
unsigned int commanddata2) {
|
||||||
FmodAudioSound *fsound = (FmodAudioSound*)command;
|
FmodAudioSound *fsound = (FmodAudioSound*)command;
|
||||||
fsound->unref();
|
fsound->unref();
|
||||||
return FMOD_OK;
|
return FMOD_OK;
|
||||||
@ -287,7 +287,7 @@ set_time(float start_time) {
|
|||||||
FMOD_RESULT result;
|
FMOD_RESULT result;
|
||||||
bool playing;
|
bool playing;
|
||||||
|
|
||||||
int startTime = start_time * 1000;
|
int startTime = (int)(start_time * 1000);
|
||||||
|
|
||||||
if (_channel != 0) {
|
if (_channel != 0) {
|
||||||
// try backing up current sound.
|
// try backing up current sound.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user