A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 57 lines 1.8 kB view raw
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * $Id$ 9 * 10 * Copyright (C) 2005 Miika Pekkarinen 11 * 12 * This program is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; either version 2 15 * of the License, or (at your option) any later version. 16 * 17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 * KIND, either express or implied. 19 * 20 ****************************************************************************/ 21 22#ifndef _CODEC_THREAD_H 23#define _CODEC_THREAD_H 24 25#include <stdbool.h> 26#include "config.h" 27 28/* codec identity */ 29const char *get_codec_filename(int cod_spec); 30 31/* codec thread */ 32void codec_thread_init(void) INIT_ATTR; 33 34/* Audio MUST be stopped before requesting callback! */ 35void codec_thread_do_callback(void (*fn)(void), 36 unsigned int *codec_thread_id); 37 38#ifdef HAVE_PRIORITY_SCHEDULING 39int codec_thread_get_priority(void); 40int codec_thread_set_priority(int priority); 41#endif 42 43/* codec commands - on audio thread only! */ 44bool codec_load(int hid, int cod_spec); 45void codec_go(void); 46bool codec_pause(void); 47void codec_seek(long time); 48void codec_stop(void); 49#ifdef HAVE_RECORDING 50size_t codec_finish_stream(void); 51#endif 52void codec_unload(void); 53int codec_loaded(void); 54 55/* */ 56 57#endif /* _CODEC_THREAD_H */