Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fe0c4ff3
Commit
fe0c4ff3
authored
Jan 07, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/recorder: move code to method Commit()
parent
7a2af0fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+18
-4
No files found.
src/output/plugins/RecorderOutputPlugin.cxx
View file @
fe0c4ff3
...
...
@@ -86,6 +86,12 @@ struct RecorderOutput {
void
SendTag
(
const
Tag
&
tag
);
size_t
Play
(
const
void
*
chunk
,
size_t
size
,
Error
&
error
);
private
:
/**
* Finish the encoder and commit the file.
*/
bool
Commit
(
Error
&
error
);
};
static
constexpr
Domain
recorder_output_domain
(
"recorder_output"
);
...
...
@@ -223,19 +229,27 @@ RecorderOutput::Open(AudioFormat &audio_format, Error &error)
return
true
;
}
inline
void
RecorderOutput
::
C
lose
(
)
inline
bool
RecorderOutput
::
C
ommit
(
Error
&
error
)
{
/* flush the encoder and write the rest to the file */
if
(
encoder_end
(
encoder
,
IgnoreError
()))
EncoderToFile
(
IgnoreError
()
);
bool
success
=
encoder_end
(
encoder
,
error
)
&&
EncoderToFile
(
error
);
/* now really close everything */
encoder_close
(
encoder
);
close
(
fd
);
return
success
;
}
inline
void
RecorderOutput
::
Close
()
{
Commit
(
IgnoreError
());
}
inline
void
...
...
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