|
|
|
|
@ -327,13 +327,13 @@ class OggWriter
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
OggWriter(int channel_count, long sample_rate, int bits_per_sample, std::ofstream & stream, const std::vector<metadata_type> & metadata)
|
|
|
|
|
OggWriter(int channel_count, long sample_rate, int bits_per_sample, std::ofstream & stream, const std::vector<metadata_type> & md)
|
|
|
|
|
{
|
|
|
|
|
channel_count = channel_count;
|
|
|
|
|
sample_rate = sample_rate;
|
|
|
|
|
bits_per_sample = bits_per_sample;
|
|
|
|
|
ostream = &stream;
|
|
|
|
|
metadata = metadata;
|
|
|
|
|
metadata = md;
|
|
|
|
|
|
|
|
|
|
int oss_init_error;
|
|
|
|
|
int packet_write_error;
|
|
|
|
|
@ -347,8 +347,7 @@ public:
|
|
|
|
|
granule = 0;
|
|
|
|
|
|
|
|
|
|
// Validate parameters
|
|
|
|
|
if (channel_count < 1 && channel_count > 255)
|
|
|
|
|
throw std::runtime_error("Channel count must be between 1 and 255.");
|
|
|
|
|
if (channel_count < 1 && channel_count > 255) throw std::runtime_error("Channel count must be between 1 and 255.");
|
|
|
|
|
|
|
|
|
|
// Initialize the Ogg stream.
|
|
|
|
|
oss_init_error = ogg_stream_init(&oss, 12345);
|
|
|
|
|
|