Wavpack output can now have tags and embedded cue sheet.

This commit is contained in:
chudov
2008-10-15 02:25:21 +00:00
parent e342ad80c2
commit ab94a4f25e
7 changed files with 86 additions and 19 deletions

View File

@@ -21,6 +21,7 @@ namespace JDP {
public interface IAudioDest {
void Write(byte[] buff, uint sampleCount);
bool SetTags(NameValueCollection tags);
void Close();
long FinalSampleCount { set; }
}
@@ -65,6 +66,10 @@ namespace JDP {
public DummyWriter (string path, int bitsPerSample, int channelCount, int sampleRate) {
}
public bool SetTags(NameValueCollection tags)
{
return false;
}
public void Close() {
}
@@ -292,6 +297,11 @@ namespace JDP {
WriteHeaders();
}
public bool SetTags(NameValueCollection tags)
{
return false;
}
private void WriteHeaders() {
const uint fccRIFF = 0x46464952;
const uint fccWAVE = 0x45564157;
@@ -535,9 +545,10 @@ namespace JDP {
}
}
public void SetTags(NameValueCollection tags)
public bool SetTags(NameValueCollection tags)
{
_flacWriter.SetTags (tags);
return true;
}
public void Close() {
@@ -809,6 +820,12 @@ namespace JDP {
_wavPackWriter = new WavPackDotNet.WavPackWriter(path, bitsPerSample, channelCount, sampleRate);
}
public bool SetTags(NameValueCollection tags)
{
_wavPackWriter.SetTags(tags);
return true;
}
public long FinalSampleCount {
get {
return _wavPackWriter.FinalSampleCount;