Skip to content

Commit

Permalink
Add the missing tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Aug 24, 2024
1 parent e687681 commit d91d3b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/opus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ impl StreamWriter {
pw.write_packet(head, 42, ogg::PacketWriteEndInfo::EndPage, 0)?;
let mut tags = Vec::new();
write_opus_tags(&mut tags)?;
pw.write_packet(tags, 42, ogg::PacketWriteEndInfo::EndPage, 0)?;
Ok(Self { pw, encoder, out_encoded, total_data: 0, rx })
}

Expand Down
3 changes: 3 additions & 0 deletions test/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
break
fobj.write(opus)

data_roundtrip, sr_roundtrip = sphn.read_opus("myfile.opus")
print(data_roundtrip.shape, sr_roundtrip)
sphn.write_opus("myfile2.opus", data_roundtrip, sr_roundtrip)

0 comments on commit d91d3b6

Please sign in to comment.