encoder/Interface: move functions into the struct
This commit is contained in:
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (!encoder_open(encoder, audio_format, error)) {
|
||||
if (!encoder->Open(audio_format, error)) {
|
||||
LogError(error, "Failed to open encoder");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@@ -116,6 +116,6 @@ int main(int argc, char **argv)
|
||||
|
||||
encoder_to_stdout(*encoder);
|
||||
|
||||
encoder_close(encoder);
|
||||
encoder_finish(encoder);
|
||||
encoder->Close();
|
||||
encoder->Dispose();
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ main(gcc_unused int argc, gcc_unused char **argv)
|
||||
/* open the encoder */
|
||||
|
||||
AudioFormat audio_format(44100, SampleFormat::S16, 2);
|
||||
success = encoder_open(encoder, audio_format, IgnoreError());
|
||||
success = encoder->Open(audio_format, IgnoreError());
|
||||
assert(success);
|
||||
|
||||
encoder_to_stdout(*encoder);
|
||||
@@ -108,6 +108,6 @@ main(gcc_unused int argc, gcc_unused char **argv)
|
||||
|
||||
encoder_to_stdout(*encoder);
|
||||
|
||||
encoder_close(encoder);
|
||||
encoder_finish(encoder);
|
||||
encoder->Close();
|
||||
encoder->Dispose();
|
||||
}
|
||||
|
Reference in New Issue
Block a user