123a1bbc3SMatthias Ringwald /* 223a1bbc3SMatthias Ringwald * Copyright (C) 2017 BlueKitchen GmbH 323a1bbc3SMatthias Ringwald * 423a1bbc3SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 523a1bbc3SMatthias Ringwald * modification, are permitted provided that the following conditions 623a1bbc3SMatthias Ringwald * are met: 723a1bbc3SMatthias Ringwald * 823a1bbc3SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 923a1bbc3SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 1023a1bbc3SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 1123a1bbc3SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 1223a1bbc3SMatthias Ringwald * documentation and/or other materials provided with the distribution. 1323a1bbc3SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 1423a1bbc3SMatthias Ringwald * contributors may be used to endorse or promote products derived 1523a1bbc3SMatthias Ringwald * from this software without specific prior written permission. 1623a1bbc3SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 1723a1bbc3SMatthias Ringwald * personal benefit and not for any commercial purpose or for 1823a1bbc3SMatthias Ringwald * monetary gain. 1923a1bbc3SMatthias Ringwald * 2023a1bbc3SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 2123a1bbc3SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2223a1bbc3SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 2323a1bbc3SMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 2423a1bbc3SMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 2523a1bbc3SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 2623a1bbc3SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 2723a1bbc3SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2823a1bbc3SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2923a1bbc3SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 3023a1bbc3SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3123a1bbc3SMatthias Ringwald * SUCH DAMAGE. 3223a1bbc3SMatthias Ringwald * 3323a1bbc3SMatthias Ringwald * Please inquire about commercial licensing options at 3423a1bbc3SMatthias Ringwald * [email protected] 3523a1bbc3SMatthias Ringwald * 3623a1bbc3SMatthias Ringwald */ 3723a1bbc3SMatthias Ringwald 3823a1bbc3SMatthias Ringwald #include "btstack_audio.h" 3923a1bbc3SMatthias Ringwald 4023a1bbc3SMatthias Ringwald /* 4123a1bbc3SMatthias Ringwald * btstack_audio.c 4223a1bbc3SMatthias Ringwald * 4323a1bbc3SMatthias Ringwald */ 4423a1bbc3SMatthias Ringwald 45*e39d945bSDirk Helbig static const btstack_audio_sink_t * btstack_audio_sink_instance; 46*e39d945bSDirk Helbig 47*e39d945bSDirk Helbig static const btstack_audio_source_t * btstack_audio_source_instance; 4823a1bbc3SMatthias Ringwald 4923a1bbc3SMatthias Ringwald /** 50*e39d945bSDirk Helbig * @brief Get BTstack Audio Sink Instance 51*e39d945bSDirk Helbig * @returns btstack_audio_sink implementation 5223a1bbc3SMatthias Ringwald */ 53*e39d945bSDirk Helbig const btstack_audio_sink_t * btstack_audio_sink_get_instance(void){ 54*e39d945bSDirk Helbig return btstack_audio_sink_instance; 5523a1bbc3SMatthias Ringwald } 5623a1bbc3SMatthias Ringwald 5723a1bbc3SMatthias Ringwald /** 58*e39d945bSDirk Helbig * @brief Get BTstack Audio Source Instance 59*e39d945bSDirk Helbig * @returns btstack_audio_source implementation 6023a1bbc3SMatthias Ringwald */ 61*e39d945bSDirk Helbig const btstack_audio_source_t * btstack_audio_source_get_instance(void){ 62*e39d945bSDirk Helbig return btstack_audio_source_instance; 6323a1bbc3SMatthias Ringwald } 64*e39d945bSDirk Helbig 65*e39d945bSDirk Helbig /** 66*e39d945bSDirk Helbig * @brief Get BTstack Audio Sink Instance 67*e39d945bSDirk Helbig * @param btstack_audio_sink implementation 68*e39d945bSDirk Helbig */ 69*e39d945bSDirk Helbig void btstack_audio_sink_set_instance(const btstack_audio_sink_t * audio_sink_impl){ 70*e39d945bSDirk Helbig btstack_audio_sink_instance = audio_sink_impl; 71*e39d945bSDirk Helbig } 72*e39d945bSDirk Helbig 73*e39d945bSDirk Helbig /** 74*e39d945bSDirk Helbig * @brief Get BTstack Audio Source Instance 75*e39d945bSDirk Helbig * @param btstack_audio_source implementation 76*e39d945bSDirk Helbig */ 77*e39d945bSDirk Helbig void btstack_audio_source_set_instance(const btstack_audio_source_t * audio_source_impl){ 78*e39d945bSDirk Helbig btstack_audio_source_instance = audio_source_impl; 79*e39d945bSDirk Helbig } 80*e39d945bSDirk Helbig 81