Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
8fbbe7e4
Commit
8fbbe7e4
authored
Sep 10, 2009
by
Alexandre Savard
Browse files
[#2165] Add get and set to AudioLayer's audio recorder
parent
6f01d431
Changes
3
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/audiolayer.h
View file @
8fbbe7e4
...
...
@@ -28,6 +28,7 @@
#include
"manager.h"
#include
"mainbuffer.h"
#include
<cc++/thread.h>
// for ost::Mutex
#define FRAME_PER_BUFFER 160
...
...
@@ -37,6 +38,8 @@
* @brief Main sound class. Manages the data transfers between the application and the hardware.
*/
class
Recordable
;
class
AudioLayer
{
private:
...
...
@@ -189,8 +192,21 @@ class AudioLayer {
*/
unsigned
int
getFrameSize
()
{
return
_frameSize
;
}
/**
* Get the layer type for this instance (either Alsa or PulseAudio)
* @return unsigned int The layer type
*
*/
int
getLayerType
(
void
)
{
return
_layerType
;
}
/**
* Get a pointer to the application MainBuffer class.
*
* In order to send signal to other parts of the application, one must pass through the mainbuffer.
* Audio instances must be registered into the MainBuffer and bound together via the ManagerImpl.
*
* @return MainBuffer* a pointer to the MainBuffer instance
*/
MainBuffer
*
getMainBuffer
(
void
)
{
return
&
_mainBuffer
;
}
/**
...
...
@@ -198,6 +214,18 @@ class AudioLayer {
*/
unsigned
short
_defaultVolume
;
// 100
/**
* Set the audio recorder
*/
void
setRecorderInstance
(
Recordable
*
rec
)
{
_recorder
=
rec
;}
/**
* Get the audio recorder
*/
Recordable
*
getRecorderInstance
(
Recordable
*
rec
)
{
return
_recorder
;}
protected:
int
_layerType
;
...
...
@@ -218,12 +246,22 @@ class AudioLayer {
/**
* Urgent ring buffer used for ringtones
*/
// RingBuffer _voiceRingBuffer;
RingBuffer
_urgentRingBuffer
;
// RingBuffer _micRingBuffer;
/**
* Instance of the MainBuffer for the whole application
*
* In order to send signal to other parts of the application, one must pass through the mainbuffer.
* Audio instances must be registered into the MainBuffer and bound together via the ManagerImpl.
*
*/
MainBuffer
_mainBuffer
;
/**
* A pointer to the recordable instance (may be a call or a conference)
*/
Recordable
*
_recorder
;
/**
* Number of audio cards on which capture stream has been opened
*/
...
...
@@ -260,8 +298,6 @@ class AudioLayer {
int
_errorMessage
;
ost
::
Mutex
_mutex
;
// SFLDataFormat* out_buffer;
};
#endif // _AUDIO_LAYER_H_
sflphone-common/src/call.h
View file @
8fbbe7e4
...
...
@@ -39,8 +39,6 @@ typedef std::string CallID;
static
CallID
default_id
=
"default_id"
;
class
AudioRecord
;
class
Call
:
public
Recordable
{
public:
...
...
@@ -217,11 +215,6 @@ class Call: public Recordable{
*/
std
::
string
getFileName
()
{
return
_filename
;}
/**
* A recorder for this call
*/
// AudioRecord recAudio;
/**
* SetRecording
*/
...
...
sflphone-common/src/conference.h
View file @
8fbbe7e4
...
...
@@ -72,11 +72,6 @@ class Conference: public Recordable{
int
_nbParticipant
;
/**
* An audio recorder for this conference
*/
// AudioRecord recAudio;
};
// Conference::count = 0;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment