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
382883bb
Commit
382883bb
authored
Jun 13, 2008
by
Emmanuel Milou
Browse files
Clean up
parent
eab073e1
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
sflphone-gtk/src/audioconf.c
View file @
382883bb
...
...
@@ -599,7 +599,9 @@ GtkWidget* codecs_box()
void
select_audio_manager
(
void
)
{
g_print
(
"audio manager selected
\n
"
);
if
(
!
SHOW_ALSA_CONF
&&
!
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
pulse
)
)
)
{
g_print
(
" display alsa conf panel
\n
"
);
...
...
src/audio/alsa-bak
deleted
100644 → 0
View file @
eab073e1
This diff is collapsed.
Click to expand it.
src/audio/alsalayer.cpp
View file @
382883bb
...
...
@@ -466,11 +466,6 @@ AlsaLayer::read( void* buffer, int toCopy)
}
int
AlsaLayer
::
putMain
(
void
*
buffer
,
int
toCopy
)
{}
int
AlsaLayer
::
putInCache
(
char
code
,
void
*
buffer
,
int
toCopy
)
{}
...
...
src/audio/alsalayer.h
View file @
382883bb
...
...
@@ -186,10 +186,6 @@ class AlsaLayer : public AudioLayer {
*/
int
putInCache
(
char
code
,
void
*
buffer
,
int
toCopy
);
/**
* UNUSED in ALSA layer
*/
int
putMain
(
void
*
buffer
,
int
toCopy
);
/**
* UNUSED in ALSA layer
...
...
src/audio/audiolayer.h
View file @
382883bb
...
...
@@ -99,12 +99,6 @@ class AudioLayer {
*/
virtual
void
stopStream
(
void
)
=
0
;
/**
* Check if both capture and playback are running
* @return true if capture and playback are running
* false otherwise
*/
virtual
bool
isStreamActive
(
void
)
=
0
;
/**
* Check if the capture is running
...
...
@@ -131,7 +125,6 @@ class AudioLayer {
*/
virtual
int
putUrgent
(
void
*
buffer
,
int
toCopy
)
=
0
;
virtual
int
putMain
(
void
*
buffer
,
int
toCopy
)
=
0
;
virtual
int
putInCache
(
char
code
,
void
*
buffer
,
int
toCopy
)
=
0
;
/**
...
...
src/audio/audiortp.cpp
View file @
382883bb
...
...
@@ -336,13 +336,9 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
#ifdef DATAFORMAT_IS_FLOAT
#else
#endif
int
layer
=
audiolayer
->
getLayerType
();
//_debug(" interface %i - ALSA = %i\n" , layer, ALSA);
if
(
CHECK_INTERFACE
(
layer
,
ALSA
)
)
audiolayer
->
playSamples
(
spkrDataConverted
,
nbSample
*
sizeof
(
SFLDataFormat
),
true
);
else
audiolayer
->
putMain
(
spkrDataConverted
,
nbSample
*
sizeof
(
SFLDataFormat
)
);
audiolayer
->
playSamples
(
spkrDataConverted
,
nbSample
*
sizeof
(
SFLDataFormat
),
true
);
// Notify (with a beep) an incoming call when there is already a call
countTime
+=
time
->
getSecond
();
if
(
Manager
::
instance
().
incomingCallWaiting
()
>
0
)
{
...
...
src/audio/audiostream.cpp
View file @
382883bb
...
...
@@ -47,6 +47,7 @@ AudioStream::disconnect( void )
{
_debug
(
"Destroy audio streams
\n
"
);
pa_stream_disconnect
(
pulseStream
()
);
pa_stream_unref
(
pulseStream
()
);
}
void
...
...
@@ -74,7 +75,6 @@ AudioStream::stream_state_callback( pa_stream* s, void* user_data )
pa_stream
*
AudioStream
::
createStream
(
pa_context
*
c
)
{
_debug
(
"Creating %s stream...
\n
"
,
_streamDescription
.
c_str
());
pa_stream
*
s
;
pa_cvolume
cv
;
...
...
@@ -88,14 +88,14 @@ AudioStream::createStream( pa_context* c )
if
(
_streamType
==
PLAYBACK_STREAM
){
pa_buffer_attr
*
attributes
;
attributes
->
maxlength
=
66500
;
attributes
->
tlength
=
44100
;
attributes
->
prebuf
=
10000
;
attributes
->
minreq
=
882
;
pa_stream_connect_playback
(
s
,
NULL
,
attributes
,
//
attributes->maxlength = 66500;
//
attributes->tlength = 44100;
//
attributes->prebuf = 10000;
//
attributes->minreq = 882;
pa_stream_connect_playback
(
s
,
NULL
,
NULL
,
PA_STREAM_INTERPOLATE_TIMING
,
&
_volume
,
NULL
);
//pa_cvolume_set(&cv, sample_spec.channels ,
_volume
) , NULL );
//pa_cvolume_set(&cv, sample_spec.channels ,
PA_VOLUME_NORM
) , NULL );
}
else
if
(
_streamType
==
CAPTURE_STREAM
){
pa_stream_connect_record
(
s
,
NULL
,
NULL
,
PA_STREAM_START_CORKED
);
...
...
src/audio/pulselayer.cpp
View file @
382883bb
...
...
@@ -37,6 +37,7 @@ PulseLayer::~PulseLayer (void)
delete
playback
;
delete
record
;
pa_context_disconnect
(
context
);
pa_context_unref
(
context
);
}
void
...
...
@@ -45,6 +46,7 @@ PulseLayer::closeLayer( void )
playback
->
disconnect
();
record
->
disconnect
();
pa_context_disconnect
(
context
);
pa_context_unref
(
context
);
}
void
...
...
@@ -160,11 +162,6 @@ PulseLayer::closePlaybackStream( void )
int
PulseLayer
::
playSamples
(
void
*
buffer
,
int
toCopy
,
bool
isTalking
)
{
}
int
PulseLayer
::
putMain
(
void
*
buffer
,
int
toCopy
)
{
int
a
=
_mainSndRingBuffer
.
AvailForPut
();
if
(
a
>=
toCopy
)
{
...
...
@@ -238,11 +235,6 @@ PulseLayer::stopStream (void)
flushMic
();
}
bool
PulseLayer
::
isStreamActive
(
void
)
{
}
void
PulseLayer
::
audioCallback
(
pa_stream
*
s
,
size_t
bytes
,
void
*
userdata
)
{
...
...
src/audio/pulselayer.h
View file @
382883bb
...
...
@@ -70,8 +70,6 @@ class PulseLayer : public AudioLayer {
*/
void
flushMain
();
int
putMain
(
void
*
buffer
,
int
toCopy
);
int
putUrgent
(
void
*
buffer
,
int
toCopy
);
/**
...
...
src/iaxvoiplink.cpp
View file @
382883bb
...
...
@@ -201,11 +201,9 @@ IAXVoIPLink::getEvent()
}
_mutexIAX
.
leaveMutex
();
// Do the doodle-moodle to send audio from the microphone to the IAX channel.
sendAudioFromMic
();
// Refresh registration.
if
(
_nextRefreshStamp
&&
_nextRefreshStamp
-
2
<
time
(
NULL
))
{
sendRegister
();
...
...
@@ -622,7 +620,7 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call)
Manager
::
instance
().
peerAnsweredCall
(
id
);
//audiolayer->flushMic();
audiolayer
->
startStream
();
//
audiolayer->startStream();
// start audio here?
}
else
{
// deja connecté ?
...
...
@@ -639,7 +637,7 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call)
case
IAX_EVENT_VOICE
:
//_debug("Should have a decent value!!!!!! = %i\n" , call -> getAudioCodec());
//if( !audiolayer -> isCaptureActive())
//audiolayer->startStream();
//audiolayer->startStream();
iaxHandleVoiceEvent
(
event
,
call
);
break
;
...
...
src/managerimpl.cpp
View file @
382883bb
...
...
@@ -1224,14 +1224,14 @@ ManagerImpl::setInputAudioPlugin(const std::string& audioPlugin)
ManagerImpl
::
setOutputAudioPlugin
(
const
std
::
string
&
audioPlugin
)
{
int
layer
=
_audiodriver
->
getLayerType
();
_debug
(
"Set output audio plugin
\n
"
);
_audiodriver
->
setErrorMessage
(
-
1
);
_audiodriver
->
openDevice
(
_audiodriver
->
getIndexIn
(),
_audiodriver
->
getIndexOut
(),
_audiodriver
->
getSampleRate
(),
_audiodriver
->
getFrameSize
(),
SFL_PCM_BOTH
,
audioPlugin
);
_debug
(
"Set output audio plugin
\n
"
);
_audiodriver
->
setErrorMessage
(
-
1
);
_audiodriver
->
openDevice
(
_audiodriver
->
getIndexIn
(),
_audiodriver
->
getIndexOut
(),
_audiodriver
->
getSampleRate
(),
_audiodriver
->
getFrameSize
(),
SFL_PCM_BOTH
,
audioPlugin
);
if
(
_audiodriver
->
getErrorMessage
()
!=
-
1
)
notifyErrClient
(
_audiodriver
->
getErrorMessage
()
);
// set config
...
...
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