Support 24bit sample format and up-to 192kHz sample rate
[platform/core/api/audio-io.git] / test / audio_io_test.c
index 61ea8eb..0d9ba34 100644 (file)
@@ -127,10 +127,7 @@ void play_file_sample(char *file, int frequency, int ch, int type)
        fseek(fp, 0, SEEK_SET);
 
        printf("start to play [%s] of size [%d] with [%d][%d][%d]\n", file, file_size, frequency, ch, type);
-       if (type)
-               audio_out_create_new(frequency, ch_table[ch], AUDIO_SAMPLE_TYPE_S16_LE, &output);
-       else
-               audio_out_create_new(frequency, ch_table[ch], AUDIO_SAMPLE_TYPE_U8, &output);
+       audio_out_create_new(frequency, ch_table[ch], AUDIO_SAMPLE_TYPE_U8 + type, &output);
 
        audio_out_prepare(output);
        audio_out_get_buffer_size(output, &buffer_size);
@@ -676,7 +673,7 @@ int main(int argc, char **argv)
                printf("2. usage : audio_io_test call-forwarding-in\n");
                printf("3. usage : audio_io_test [length to read] [number of iteration] [channels]\n");
                printf("4. usage : audio_io_test async [write(1) | read(2)]\n");
-               printf("5. Uasge : audio_io_test play [filename] [sample rate] [channels] [type(0:U8)]\n");
+               printf("5. Uasge : audio_io_test play [filename] [sample rate] [channels] [type(0:U8,1:S16LE,2:S24LE,3:S24_32LE)]\n");
        }
        return 0;
 }