mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
"MAL_" to "MA_".
This commit is contained in:
@@ -95,7 +95,7 @@ int main(int argc, char** argv)
|
||||
|
||||
mal_decoder decoder;
|
||||
mal_result result = mal_decoder_init_file(argv[1], NULL, &decoder);
|
||||
if (result != MAL_SUCCESS) {
|
||||
if (result != MA_SUCCESS) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
@@ -107,13 +107,13 @@ int main(int argc, char** argv)
|
||||
config.pUserData = &decoder;
|
||||
|
||||
mal_device device;
|
||||
if (mal_device_init(NULL, &config, &device) != MAL_SUCCESS) {
|
||||
if (mal_device_init(NULL, &config, &device) != MA_SUCCESS) {
|
||||
printf("Failed to open playback device.\n");
|
||||
mal_decoder_uninit(&decoder);
|
||||
return -3;
|
||||
}
|
||||
|
||||
if (mal_device_start(&device) != MAL_SUCCESS) {
|
||||
if (mal_device_start(&device) != MA_SUCCESS) {
|
||||
printf("Failed to start playback device.\n");
|
||||
mal_device_uninit(&device);
|
||||
mal_decoder_uninit(&decoder);
|
||||
@@ -165,7 +165,7 @@ is an example for loading a decoder from a file:
|
||||
```
|
||||
mal_decoder decoder;
|
||||
mal_result result = mal_decoder_init_file("MySong.mp3", NULL, &decoder);
|
||||
if (result != MAL_SUCCESS) {
|
||||
if (result != MA_SUCCESS) {
|
||||
return false; // An error occurred.
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ You can also seek to a specific frame like so:
|
||||
|
||||
```
|
||||
mal_result result = mal_decoder_seek_to_pcm_frame(pDecoder, targetFrame);
|
||||
if (result != MAL_SUCCESS) {
|
||||
if (result != MA_SUCCESS) {
|
||||
return false; // An error occurred.
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user