mod_player.c (f89030054a3c42178f8e04b58c05aec0ee84b5d1) mod_player.c (d365bb511ad50c3e161b326cac60f8bade7ad566)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 44 unchanged lines hidden (view full) ---

53 // load mod
54 int hxcmod_initialized = hxcmod_init(&mod_context);
55 if (!hxcmod_initialized) return 10;
56
57 hxcmod_setcfg(&mod_context, 44100, 16, 1, 1, 1);
58 hxcmod_load(&mod_context, (void *) &mod_data, mod_len);
59
60 // setup audio playback
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 44 unchanged lines hidden (view full) ---

53 // load mod
54 int hxcmod_initialized = hxcmod_init(&mod_context);
55 if (!hxcmod_initialized) return 10;
56
57 hxcmod_setcfg(&mod_context, 44100, 16, 1, 1, 1);
58 hxcmod_load(&mod_context, (void *) &mod_data, mod_len);
59
60 // setup audio playback
61 const btstack_audio_t * audio = btstack_audio_get_instance();
61 const btstack_audio_sink_t * audio = btstack_audio_sink_get_instance();
62 if (!audio){
62 if (!audio){
63 printf("BTstack Audio not setup\n");
63 printf("BTstack Audio Sink not setup\n");
64 return 10;
65 }
64 return 10;
65 }
66 audio->init(2, 44100, &audio_playback, NULL);
66 audio->init(2, 44100, &audio_playback);
67 audio->start_stream();
68
69 return 0;
70}
67 audio->start_stream();
68
69 return 0;
70}