mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 09:29:16 +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;
|
||||
}
|
||||
|
||||
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,
|
||||
const AudioInjectorOptions* injectorOptions) {
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ class AudioScriptingInterface : public QObject {
|
|||
Q_OBJECT
|
||||
public slots:
|
||||
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,
|
||||
const AudioInjectorOptions* injectorOptions = NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue