sfizz/external/st_audiofile/src/st_audiofile_common.c

45 lines
1 KiB
C
Raw Normal View History

2020-10-07 16:41:31 +02:00
// SPDX-License-Identifier: BSD-2-Clause
// This code is part of the sfizz library and is licensed under a BSD 2-clause
// license. You should have receive a LICENSE.md file along with the code.
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
#include "st_audiofile.h"
#include <stddef.h>
const char* st_get_type_string(st_audio_file* af)
{
return st_type_string(st_get_type(af));
}
const char* st_type_string(int type)
{
const char *type_string = NULL;
switch (type) {
case st_audio_file_wav:
type_string = "WAV";
break;
case st_audio_file_flac:
type_string = "FLAC";
break;
2020-10-31 11:59:45 +01:00
case st_audio_file_aiff:
type_string = "AIFF";
break;
2020-10-07 16:41:31 +02:00
case st_audio_file_ogg:
type_string = "OGG";
break;
2020-10-09 15:41:08 +02:00
case st_audio_file_mp3:
type_string = "MP3";
break;
2022-09-28 23:09:50 +02:00
case st_audio_file_wv:
type_string = "WV";
break;
2020-10-07 16:41:31 +02:00
case st_audio_file_other:
type_string = "other";
break;
}
return type_string;
}