mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
set_wavoutput added to set writing audio out to a wav file
This commit is contained in:
parent
dbbf6ef012
commit
609d274573
@ -111,6 +111,8 @@ FmodAudioManager() {
|
|||||||
_up.y = 0;
|
_up.y = 0;
|
||||||
_up.z = 0;
|
_up.z = 0;
|
||||||
|
|
||||||
|
_saved_outputtype = FMOD_OUTPUTTYPE_AUTODETECT;
|
||||||
|
|
||||||
if (_system == (FMOD::System *)NULL) {
|
if (_system == (FMOD::System *)NULL) {
|
||||||
// Create the global FMOD System object. This one object must be
|
// Create the global FMOD System object. This one object must be
|
||||||
// shared by all FmodAudioManagers (this is particularly true on
|
// shared by all FmodAudioManagers (this is particularly true on
|
||||||
@ -562,6 +564,24 @@ get_volume() const {
|
|||||||
return (PN_stdfloat)volume;
|
return (PN_stdfloat)volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: FmodAudioManager::set_wavwriter()
|
||||||
|
// Access: Public
|
||||||
|
// Description: Changes output mode to write all audio to a wav file.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
void FmodAudioManager::
|
||||||
|
set_wavwriter(bool outputwav) {
|
||||||
|
ReMutexHolder holder(_lock);
|
||||||
|
if (outputwav) {
|
||||||
|
_system->getOutput(&_saved_outputtype);
|
||||||
|
_system->setOutput(FMOD_OUTPUTTYPE_WAVWRITER);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_system->setOutput(_saved_outputtype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: FmodAudioManager::set_active(bool active)
|
// Function: FmodAudioManager::set_active(bool active)
|
||||||
// Access: Public
|
// Access: Public
|
||||||
|
@ -98,7 +98,7 @@ class EXPCL_FMOD_AUDIO FmodAudioManager : public AudioManager {
|
|||||||
virtual ~FmodAudioManager();
|
virtual ~FmodAudioManager();
|
||||||
|
|
||||||
virtual bool is_valid();
|
virtual bool is_valid();
|
||||||
|
|
||||||
virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic);
|
virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic);
|
||||||
virtual PT(AudioSound) get_sound(MovieAudio *, bool positional = false, int mode=SM_heuristic);
|
virtual PT(AudioSound) get_sound(MovieAudio *, bool positional = false, int mode=SM_heuristic);
|
||||||
|
|
||||||
@ -107,7 +107,11 @@ class EXPCL_FMOD_AUDIO FmodAudioManager : public AudioManager {
|
|||||||
|
|
||||||
virtual void set_volume(PN_stdfloat);
|
virtual void set_volume(PN_stdfloat);
|
||||||
virtual PN_stdfloat get_volume() const;
|
virtual PN_stdfloat get_volume() const;
|
||||||
|
|
||||||
|
virtual void set_wavwriter(bool);
|
||||||
|
|
||||||
|
virtual void set_wavwriter(bool);
|
||||||
|
|
||||||
virtual void set_active(bool);
|
virtual void set_active(bool);
|
||||||
virtual bool get_active() const;
|
virtual bool get_active() const;
|
||||||
|
|
||||||
@ -199,6 +203,8 @@ private:
|
|||||||
typedef pset<FmodAudioSound *> SoundSet;
|
typedef pset<FmodAudioSound *> SoundSet;
|
||||||
SoundSet _all_sounds;
|
SoundSet _all_sounds;
|
||||||
|
|
||||||
|
FMOD_OUTPUTTYPE _saved_output;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//These are needed for Panda's Pointer System. DO NOT ERASE!
|
//These are needed for Panda's Pointer System. DO NOT ERASE!
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user