mirror of
https://github.com/danog/php-libtgvoip.git
synced 2024-11-30 04:19:26 +01:00
Check if isPlaying()
This commit is contained in:
parent
69f4905dc0
commit
e181d51de2
@ -151,7 +151,9 @@ void AudioInputModule::RunSenderThread() {
|
|||||||
inputFiles.pop();
|
inputFiles.pop();
|
||||||
memset(data + (read % inputCSamplesSize), 0, inputCSamplesSize - (read % inputCSamplesSize));
|
memset(data + (read % inputCSamplesSize), 0, inputCSamplesSize - (read % inputCSamplesSize));
|
||||||
}
|
}
|
||||||
|
wrapper->playing = true;
|
||||||
} else {
|
} else {
|
||||||
|
wrapper->playing = false;
|
||||||
if (holdFiles.empty()) {
|
if (holdFiles.empty()) {
|
||||||
memset(data, 0, inputCSamplesSize);
|
memset(data, 0, inputCSamplesSize);
|
||||||
} else {
|
} else {
|
||||||
|
7
main.cpp
7
main.cpp
@ -35,6 +35,7 @@ void VoIP::__construct()
|
|||||||
current_call = params[1];*/
|
current_call = params[1];*/
|
||||||
in=NULL;
|
in=NULL;
|
||||||
out=NULL;
|
out=NULL;
|
||||||
|
playing = false;
|
||||||
inst = new VoIPController();
|
inst = new VoIPController();
|
||||||
|
|
||||||
inst->implData = (void *) this;
|
inst->implData = (void *) this;
|
||||||
@ -222,6 +223,11 @@ Php::Value VoIP::getState()
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Php::Value VoIP::isPlaying()
|
||||||
|
{
|
||||||
|
return playing;
|
||||||
|
}
|
||||||
|
|
||||||
Php::Value VoIP::getOutputState()
|
Php::Value VoIP::getOutputState()
|
||||||
{
|
{
|
||||||
return outputState;
|
return outputState;
|
||||||
@ -296,6 +302,7 @@ PHPCPP_EXPORT void *get_module()
|
|||||||
|
|
||||||
|
|
||||||
voip.method<&VoIP::getState>("getState", Php::Public | Php::Final);
|
voip.method<&VoIP::getState>("getState", Php::Public | Php::Final);
|
||||||
|
voip.method<&VoIP::isPlaying>("isPlaying", Php::Public | Php::Final);
|
||||||
voip.method<&VoIP::getOutputState>("getOutputState", Php::Public | Php::Final);
|
voip.method<&VoIP::getOutputState>("getOutputState", Php::Public | Php::Final);
|
||||||
voip.method<&VoIP::getInputState>("getInputState", Php::Public | Php::Final);
|
voip.method<&VoIP::getInputState>("getInputState", Php::Public | Php::Final);
|
||||||
voip.method<&VoIP::getOutputParams>("getOutputParams", Php::Public | Php::Final);
|
voip.method<&VoIP::getOutputParams>("getOutputParams", Php::Public | Php::Final);
|
||||||
|
5
main.h
5
main.h
@ -93,6 +93,9 @@ class VoIP : public Php::Base
|
|||||||
|
|
||||||
Php::Value getOutputParams();
|
Php::Value getOutputParams();
|
||||||
Php::Value getInputParams();
|
Php::Value getInputParams();
|
||||||
|
|
||||||
|
Php::Value isPlaying();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Php::Value madeline;
|
Php::Value madeline;
|
||||||
Php::Value current_call;
|
Php::Value current_call;
|
||||||
@ -106,7 +109,7 @@ class VoIP : public Php::Base
|
|||||||
|
|
||||||
int inputState = AUDIO_STATE_NONE;
|
int inputState = AUDIO_STATE_NONE;
|
||||||
int outputState = AUDIO_STATE_NONE;
|
int outputState = AUDIO_STATE_NONE;
|
||||||
|
bool playing;
|
||||||
private:
|
private:
|
||||||
VoIPController *inst;
|
VoIPController *inst;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user