mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:22:57 +02:00
Merge pull request #2816 from birarda/stop-sound
add interface to Audio to stop injector and see if playing
This commit is contained in:
commit
6762d4d63c
2 changed files with 12 additions and 0 deletions
|
@ -32,6 +32,16 @@ AudioInjector* AudioScriptingInterface::playSound(Sound* sound, const AudioInjec
|
||||||
return injector;
|
return injector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudioScriptingInterface::stopInjector(AudioInjector* injector) {
|
||||||
|
if (injector) {
|
||||||
|
injector->stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AudioScriptingInterface::isInjectorPlaying(AudioInjector* injector) {
|
||||||
|
return (injector != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void AudioScriptingInterface::startDrumSound(float volume, float frequency, float duration, float decay,
|
void AudioScriptingInterface::startDrumSound(float volume, float frequency, float duration, float decay,
|
||||||
const AudioInjectorOptions* injectorOptions) {
|
const AudioInjectorOptions* injectorOptions) {
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ class AudioScriptingInterface : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public slots:
|
public slots:
|
||||||
static AudioInjector* playSound(Sound* sound, const AudioInjectorOptions* injectorOptions = NULL);
|
static AudioInjector* playSound(Sound* sound, const AudioInjectorOptions* injectorOptions = NULL);
|
||||||
|
static void stopInjector(AudioInjector* injector);
|
||||||
|
static bool isInjectorPlaying(AudioInjector* injector);
|
||||||
static void startDrumSound(float volume, float frequency, float duration, float decay,
|
static void startDrumSound(float volume, float frequency, float duration, float decay,
|
||||||
const AudioInjectorOptions* injectorOptions = NULL);
|
const AudioInjectorOptions* injectorOptions = NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue