mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
LibAudio: Write final FLAC audio data instead of discarding it
This commit is contained in:
parent
1a1cba1c3f
commit
c7f416682b
1 changed files with 3 additions and 2 deletions
|
@ -40,11 +40,12 @@ ErrorOr<void> FlacWriter::finalize()
|
|||
if (m_state == WriteState::FullyFinalized)
|
||||
return Error::from_string_view("File is already finalized"sv);
|
||||
|
||||
// TODO: Write missing sample data instead of discarding it.
|
||||
|
||||
if (m_state == WriteState::HeaderUnwritten)
|
||||
TRY(finalize_header_format());
|
||||
|
||||
if (!m_sample_buffer.is_empty())
|
||||
TRY(write_frame());
|
||||
|
||||
{
|
||||
// 1 byte metadata block header + 3 bytes size + 2*2 bytes min/max block size
|
||||
TRY(m_stream->seek(m_streaminfo_start_index + 8, AK::SeekMode::SetPosition));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue