Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-camogm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-camogm
Commits
c2d76746
Commit
c2d76746
authored
Jun 21, 2017
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: recover audio stream after buffer overrun
parent
d37d4a2f
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
171 additions
and
23 deletions
+171
-23
camogm.c
src/camogm.c
+5
-0
camogm_audio.c
src/camogm_audio.c
+160
-23
camogm_audio.h
src/camogm_audio.h
+6
-0
No files found.
src/camogm.c
View file @
c2d76746
...
@@ -1769,6 +1769,11 @@ int listener_loop(camogm_state *state)
...
@@ -1769,6 +1769,11 @@ int listener_loop(camogm_state *state)
}
else
{
}
else
{
D6
(
fprintf
(
debug_file
,
"not recording audio samples after this frame
\n
"
));
D6
(
fprintf
(
debug_file
,
"not recording audio samples after this frame
\n
"
));
}
}
// === debug code ===
fprintf
(
debug_file
,
"video frames recorded: %d
\n
"
,
state
->
frameno
);
// ===end of debug ===
audio_process
(
&
state
->
audio
);
audio_process
(
&
state
->
audio
);
}
}
}
}
...
...
src/camogm_audio.c
View file @
c2d76746
This diff is collapsed.
Click to expand it.
src/camogm_audio.h
View file @
c2d76746
...
@@ -51,6 +51,12 @@ struct context_audio {
...
@@ -51,6 +51,12 @@ struct context_audio {
struct
timeval
time_last
;
///< calculated time of last audio sample (this value is not taken from ALSA)
struct
timeval
time_last
;
///< calculated time of last audio sample (this value is not taken from ALSA)
long
rem_samples
;
///< remaining samples
long
rem_samples
;
///< remaining samples
long
lost_frames
;
///< the number of frames lost after buffer overrun
char
*
xrun_buffer
;
///< temporary storage for the data saved in buffer befor xrun
long
xrun_pos
;
///< number of samples in xrun buffer
long
xrun_append
;
///< save in buffer this number of frames after xrun, all other frames in chunk
///< will be silence
snd_pcm_format_t
audio_format
;
///< format of audio samples as defined in 'enum snd_pcm_format_t'
snd_pcm_format_t
audio_format
;
///< format of audio samples as defined in 'enum snd_pcm_format_t'
snd_pcm_t
*
capture_hnd
;
///< ALSA PCM handle
snd_pcm_t
*
capture_hnd
;
///< ALSA PCM handle
};
};
...
...
Write
Preview
Markdown
is supported
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