50 lines · 1.7 KB · C
RawDownload
////  AudioScriptingInterface.h//  libraries/audio/src////  Created by Stephen Birarda on 1/2/2014.//  Copyright 2014 High Fidelity, Inc.////  Distributed under the Apache License, Version 2.0.//  See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html// #ifndef hifi_AudioScriptingInterface_h#define hifi_AudioScriptingInterface_h #include <AbstractAudioInterface.h>#include <AudioInjector.h>#include <Sound.h> class ScriptAudioInjector; class AudioScriptingInterface : public QObject {    Q_OBJECTpublic:    static AudioScriptingInterface& getInstance();     void setLocalAudioInterface(AbstractAudioInterface* audioInterface) { _localAudioInterface = audioInterface; } protected:    // this method is protected to stop C++ callers from calling, but invokable from script    Q_INVOKABLE ScriptAudioInjector* playSound(SharedSoundPointer sound, const AudioInjectorOptions& injectorOptions = AudioInjectorOptions());     Q_INVOKABLE void setStereoInput(bool stereo); signals:    void mutedByMixer(); /// the client has been muted by the mixer    void environmentMuted(); /// the entire environment has been muted by the mixer    void receivedFirstPacket(); /// the client has received its first packet from the audio mixer    void disconnected(); /// the client has been disconnected from the audio mixer    void noiseGateOpened(); /// the noise gate has opened    void noiseGateClosed(); /// the noise gate has closed    void inputReceived(const QByteArray& inputSamples); /// a frame of mic input audio has been received and processed private:    AudioScriptingInterface();    AbstractAudioInterface* _localAudioInterface;}; void registerAudioMetaTypes(QScriptEngine* engine); #endif // hifi_AudioScriptingInterface_h

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t