| 1 |
/* |
| 2 |
* Copyright 2008-2011 Various Authors |
| 3 |
* Copyright 2004 Timo Hirvonen |
| 4 |
* |
| 5 |
* This program is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU General Public License as |
| 7 |
* published by the Free Software Foundation; either version 2 of the |
| 8 |
* License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program; if not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef _MISC_H |
| 20 |
#define _MISC_H |
| 21 |
|
| 22 |
extern const char *cmus_config_dir; |
| 23 |
extern const char *home_dir; |
| 24 |
extern const char *user_name; |
| 25 |
|
| 26 |
char **get_words(const char *text); |
| 27 |
int strptrcmp(const void *a, const void *b); |
| 28 |
int strptrcoll(const void *a, const void *b); |
| 29 |
int misc_init(void); |
| 30 |
const char *escape(const char *str); |
| 31 |
const char *unescape(const char *str); |
| 32 |
|
| 33 |
/* |
| 34 |
* @field contains Replay Gain data format in bit representation |
| 35 |
* @gain pointer where to store gain value * 10 |
| 36 |
* |
| 37 |
* Returns 0 if @field doesn't contain a valid gain value, |
| 38 |
* 1 for track (= radio) adjustment |
| 39 |
* 2 for album (= audiophile) adjustment |
| 40 |
* |
| 41 |
* http://replaygain.hydrogenaudio.org/rg_data_format.html |
| 42 |
*/ |
| 43 |
int replaygain_decode(unsigned int field, int *gain); |
| 44 |
|
| 45 |
char *expand_filename(const char *name); |
| 46 |
|
| 47 |
#endif |