mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-28 18:32:38 +00:00
More main.c test code.
This commit is contained in:
parent
6f8dcdbfd5
commit
87b1f55d7b
@ -1,5 +1,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <core_c/musikcore_c.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
@ -8,7 +9,7 @@ int main(int argc, char** argv) {
|
||||
if (context) {
|
||||
printf("initialized\n");
|
||||
}
|
||||
mcsdk_map_list ml = mcsdk_svc_metadata_query_albums(context->metadata, "alice");
|
||||
mcsdk_map_list ml = mcsdk_svc_metadata_query_albums(context->metadata, "beatles");
|
||||
int count = mcsdk_map_list_get_count(ml);
|
||||
for (int i = 0; i < count; i++) {
|
||||
mcsdk_map m = mcsdk_map_list_get_at(ml, i);
|
||||
@ -19,6 +20,12 @@ int main(int argc, char** argv) {
|
||||
free(str);
|
||||
}
|
||||
mcsdk_map_list_release(ml);
|
||||
mcsdk_track_list tl = mcsdk_svc_metadata_query_tracks(
|
||||
context->metadata, "a day in the life", mcsdk_no_limit, mcsdk_no_offset);
|
||||
mcsdk_svc_playback_play(context->playback, tl, 0);
|
||||
mcsdk_track_list_release(tl);
|
||||
usleep(1000000 * 5);
|
||||
mcsdk_context_release(&context);
|
||||
printf("released\n");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user