Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
0467fbb7
Commit
0467fbb7
authored
17 years ago
by
Guillaume Carmel-Archambault
Browse files
Options
Downloads
Patches
Plain Diff
Temporary back to sflphonedrc device selection
parent
e8ea6e6e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/audio/audiolayer.cpp
+8
-16
8 additions, 16 deletions
src/audio/audiolayer.cpp
src/audio/audiolayer.h
+6
-0
6 additions, 0 deletions
src/audio/audiolayer.h
with
14 additions
and
16 deletions
src/audio/audiolayer.cpp
+
8
−
16
View file @
0467fbb7
...
...
@@ -115,13 +115,15 @@ AudioLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize
{
closeStream
();
_indexIn
=
indexIn
;
_indexOut
=
indexOut
;
_sampleRate
=
sampleRate
;
_frameSize
=
frameSize
;
int
portaudioFramePerBuffer
=
FRAME_PER_BUFFER
;
//=FRAME_PER_BUFFER; //= paFramesPerBufferUnspecified;
//int portaudioFramePerBuffer = (int) (8000 * frameSize / 1000); //= paFramesPerBufferUnspecified;
// Select default audio API
selectPreferedApi
(
paALSA
,
indexIn
,
indexOut
);
//
selectPreferedApi(paALSA,
_
indexIn,
_
indexOut);
int
nbDevice
=
getDeviceCount
();
_debug
(
"Nb of audio devices: %i
\n
"
,
nbDevice
);
...
...
@@ -129,17 +131,7 @@ AudioLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize
_debug
(
"Portaudio detect no sound card."
);
return
;
}
else
{
// not good,
// if (indexIn >= nbDevice) {
// _debug(" Portaudio auto-select device #0 for input because device #%02d is not found\n", indexIn);
// indexIn = 0;
// }
// if (indexOut >= nbDevice) {
// _debug(" Portaudio auto-select device #0 for output because device #%02d is not found\n", indexOut);
// indexOut = 0;
// }
_debug
(
" Setting audiolayer: device in=%2d, out=%2d
\n
"
,
indexIn
,
indexOut
);
_debug
(
" Setting audiolayer: device in=%2d, out=%2d
\n
"
,
_indexIn
,
_indexOut
);
_debug
(
" : nb channel in=%2d, out=%2d
\n
"
,
_inChannel
,
_outChannel
);
_debug
(
" : sample rate=%5d, format=%s
\n
"
,
_sampleRate
,
SFLPortaudioFormatString
);
_debug
(
" : frame per buffer=%d
\n
"
,
portaudioFramePerBuffer
);
...
...
@@ -148,15 +140,15 @@ AudioLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize
try
{
// Set up the parameters required to open a (Callback)Stream:
portaudio
::
DirectionSpecificStreamParameters
inParams
(
portaudio
::
System
::
instance
().
deviceByIndex
(
indexIn
),
inParams
(
portaudio
::
System
::
instance
().
deviceByIndex
(
_
indexIn
),
_inChannel
,
SFLPortaudioFormat
,
true
,
portaudio
::
System
::
instance
().
deviceByIndex
(
indexIn
).
defaultLowInputLatency
(),
portaudio
::
System
::
instance
().
deviceByIndex
(
_
indexIn
).
defaultLowInputLatency
(),
NULL
);
portaudio
::
DirectionSpecificStreamParameters
outParams
(
portaudio
::
System
::
instance
().
deviceByIndex
(
indexOut
),
portaudio
::
System
::
instance
().
deviceByIndex
(
_
indexOut
),
_outChannel
,
SFLPortaudioFormat
,
true
,
portaudio
::
System
::
instance
().
deviceByIndex
(
indexOut
).
defaultLowOutputLatency
(),
portaudio
::
System
::
instance
().
deviceByIndex
(
_
indexOut
).
defaultLowOutputLatency
(),
NULL
);
// like audacity
...
...
This diff is collapsed.
Click to expand it.
src/audio/audiolayer.h
+
6
−
0
View file @
0467fbb7
...
...
@@ -116,6 +116,12 @@ class AudioLayer {
portaudio
::
MemFunCallbackStream
<
AudioLayer
>
*
_stream
;
/**
* Portaudio indexes of audio devices on which stream has been opened
*/
int
_indexIn
;
int
_indexOut
;
/**
* Sample Rate SFLphone should send sound data to the sound card
* The value can be set in the user config file- now: 44100HZ
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment