Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Digital Signal Processing Engine Library
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
DSPE
Digital Signal Processing Engine Library
Commits
49a0b017
Commit
49a0b017
authored
3 years ago
by
Damian Karaś
Browse files
Options
Downloads
Patches
Plain Diff
ALSA_support: Prepare buffer to be filled
Signed-off-by:
Damian Karaś
<
s176030@student.pg.edu.pl
>
parent
1c06033e
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cpp/ALSA_support.cpp
+9
-2
9 additions, 2 deletions
src/cpp/ALSA_support.cpp
src/include/ALSA_support.h
+3
-0
3 additions, 0 deletions
src/include/ALSA_support.h
with
12 additions
and
2 deletions
src/cpp/ALSA_support.cpp
+
9
−
2
View file @
49a0b017
...
@@ -94,7 +94,7 @@ unsigned int DSP::ALSA_object_t::select_output_device_by_number(const unsigned i
...
@@ -94,7 +94,7 @@ unsigned int DSP::ALSA_object_t::select_output_device_by_number(const unsigned i
bool
DSP
::
ALSA_object_t
::
is_input_callback_supported
(
void
)
bool
DSP
::
ALSA_object_t
::
is_input_callback_supported
(
void
)
{
{
return
tru
e
;
return
fals
e
;
}
}
bool
DSP
::
ALSA_object_t
::
is_output_callback_supported
(
void
)
bool
DSP
::
ALSA_object_t
::
is_output_callback_supported
(
void
)
...
@@ -106,6 +106,7 @@ void DSP::ALSA_object_t::log_driver_data()
...
@@ -106,6 +106,7 @@ void DSP::ALSA_object_t::log_driver_data()
{
{
#ifdef AUDIO_DEBUG_MESSAGES_ON
#ifdef AUDIO_DEBUG_MESSAGES_ON
//! For logging
int
val
;
int
val
;
DSP
::
log
<<
"ALSA library version: "
<<
SND_LIB_VERSION_STR
<<
endl
;
DSP
::
log
<<
"ALSA library version: "
<<
SND_LIB_VERSION_STR
<<
endl
;
...
@@ -146,7 +147,8 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type)
...
@@ -146,7 +147,8 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type)
int
rc
;
int
rc
;
//! Errors controller in set_snd_pcm_format() function
//! Errors controller in set_snd_pcm_format() function
int
errc
;
int
errc
;
//! Local configuration space handler
snd_pcm_hw_params_t
*
params
;
snd_pcm_hw_params_t
*
params
;
//! For logging
//! For logging
...
@@ -888,6 +890,11 @@ bool DSP::ALSA_object_t::start_recording(void)
...
@@ -888,6 +890,11 @@ bool DSP::ALSA_object_t::start_recording(void)
bool
DSP
::
ALSA_object_t
::
get_wave_in_raw_buffer
(
DSP
::
e
::
SampleType
&
InSampleType
,
std
::
vector
<
char
>
&
wave_in_raw_buffer
)
bool
DSP
::
ALSA_object_t
::
get_wave_in_raw_buffer
(
DSP
::
e
::
SampleType
&
InSampleType
,
std
::
vector
<
char
>
&
wave_in_raw_buffer
)
{
{
assert
(
!
"DSP::ALSA_object_t::get_wave_in_raw_buffer not implemented yet"
);
assert
(
!
"DSP::ALSA_object_t::get_wave_in_raw_buffer not implemented yet"
);
InSampleTypeALSA
=
InSampleType
;
snd_pcm_sframes_t
rc
;
return
true
;
return
true
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/include/ALSA_support.h
+
3
−
0
View file @
49a0b017
...
@@ -76,6 +76,9 @@ namespace DSP {
...
@@ -76,6 +76,9 @@ namespace DSP {
//! just samples
//! just samples
snd_pcm_uframes_t
audio_inbuffer_size_in_frames
;
// M.B. more meaningful variable name
snd_pcm_uframes_t
audio_inbuffer_size_in_frames
;
// M.B. more meaningful variable name
//! Type of samples in WaveInBuffers
DSP
::
e
::
SampleType
InSampleTypeALSA
;
//! We always use the non-blocking mode in DSPElib
//! We always use the non-blocking mode in DSPElib
bool
non_blocking_mode
;
bool
non_blocking_mode
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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