mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fixes based on a pass over everything with autoconf/automake
This commit is contained in:
@@ -23,6 +23,14 @@ EXTRA_DIST = \
|
||||
Makefile.lite \
|
||||
id3_tag.c
|
||||
|
||||
noinst_HEADERS = \
|
||||
charset.h \
|
||||
configure.h \
|
||||
genres.h \
|
||||
id3_tag.h \
|
||||
mylocale.h \
|
||||
wrap_id3.h
|
||||
|
||||
CFLAGS = @CFLAGS@ @XMMS_CFLAGS@
|
||||
xmmsinputplugindir = @XMMS_INPUT_PLUGIN_DIR@
|
||||
|
||||
@@ -31,7 +39,7 @@ LIBTOOL = $(top_builddir)/libtool-disable-static
|
||||
|
||||
xmmsinputplugin_LTLIBRARIES = libxmms-flac.la
|
||||
|
||||
plugin_sources = plugin.c wrap_id3.c configure.c charset.c
|
||||
plugin_sources = configure.c charset.c plugin.c wrap_id3.c
|
||||
id3v2_sources = id3_tag.c
|
||||
|
||||
if FLaC__HAS_ID3LIB
|
||||
|
||||
@@ -20,15 +20,14 @@
|
||||
#
|
||||
|
||||
LIB_NAME = libxmms-flac
|
||||
INCLUDES = $(shell xmms-config --cflags) -I./include -I../../include
|
||||
LIBS = ../../obj/lib/libFLAC.a
|
||||
INCLUDES = $(shell xmms-config --cflags) -I./include -I../../include -I..
|
||||
LIBS = ../../obj/lib/libFLAC.a ../../obj/lib/libplugin-common.a
|
||||
|
||||
OBJS = \
|
||||
plugin.o \
|
||||
charset.o \
|
||||
configure.o \
|
||||
wrap_id3.o \
|
||||
charset.o
|
||||
|
||||
plugin.o \
|
||||
wrap_id3.o
|
||||
|
||||
include ../../build/lib.mk
|
||||
|
||||
|
||||
@@ -36,12 +36,12 @@ gboolean get_file_info(char *filename, flac_file_info_struct *tmp_file_info)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
tmp_file_info->sample_rate = streaminfo.data.stream_info.sample_rate;
|
||||
tmp_file_info->channels = streaminfo.data.stream_info.channels;
|
||||
tmp_file_info->bits_per_sample = streaminfo.data.stream_info.bits_per_sample;
|
||||
tmp_file_info->total_samples = streaminfo.data.stream_info.total_samples;
|
||||
tmp_file_info->sample_rate = streaminfo.data.stream_info.sample_rate;
|
||||
tmp_file_info->channels = streaminfo.data.stream_info.channels;
|
||||
tmp_file_info->bits_per_sample = streaminfo.data.stream_info.bits_per_sample;
|
||||
tmp_file_info->total_samples = streaminfo.data.stream_info.total_samples;
|
||||
|
||||
tmp_file_info->length_in_msec = streaminfo.data.stream_info.total_samples * 10 / (streaminfo.data.stream_info.sample_rate / 100);
|
||||
tmp_file_info->length_in_msec = streaminfo.data.stream_info.total_samples * 10 / (streaminfo.data.stream_info.sample_rate / 100);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -88,8 +88,7 @@ static gint genre_comp_func(gconstpointer a, gconstpointer b)
|
||||
|
||||
static gchar* channel_mode_name(int mode)
|
||||
{
|
||||
static const gchar *channel_mode[] =
|
||||
{N_("Mono"), N_("Stereo")};
|
||||
static const gchar *channel_mode[] = {N_("Mono"), N_("Stereo")};
|
||||
if (mode < 1 || mode > 2)
|
||||
return "";
|
||||
return gettext(channel_mode[mode]);
|
||||
@@ -315,11 +314,9 @@ void FLAC_XMMS__file_info_box(char *filename)
|
||||
label_set_text(flac_bitrate, _("Bits/Samples: %d"), tmp_file_info->bits_per_sample);
|
||||
/* tmp_file_info->length_in_msec */
|
||||
|
||||
label_set_text(flac_samplerate, _("Samplerate: %ld Hz"), tmp_file_info->sample_rate);
|
||||
label_set_text(flac_samplerate, _("Samplerate: %ld Hz"), tmp_file_info->sample_rate);
|
||||
label_set_text(flac_channel, _("Channel: %s"), channel_mode_name(tmp_file_info->channel);
|
||||
#if 0
|
||||
label_set_text(flac_fileinfo, _("%d frames\nFilesize: %lu B"), num_frames, ftell(fh));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -125,22 +125,19 @@ void FLAC_XMMS__init()
|
||||
flac_cfg.convert_char_set = FALSE;
|
||||
|
||||
cfg = xmms_cfg_open_default_file();
|
||||
|
||||
xmms_cfg_read_boolean(cfg, "flac", "tag_override", &flac_cfg.tag_override);
|
||||
if (!xmms_cfg_read_string(cfg, "flac", "tag_format",
|
||||
&flac_cfg.tag_format))
|
||||
|
||||
if(!xmms_cfg_read_string(cfg, "flac", "tag_format", &flac_cfg.tag_format))
|
||||
flac_cfg.tag_format = g_strdup("%p - %t");
|
||||
|
||||
xmms_cfg_read_boolean(cfg, "flac", "convert_char_set", &flac_cfg.convert_char_set);
|
||||
if (!xmms_cfg_read_string(cfg, "flac", "file_char_set",
|
||||
&flac_cfg.file_char_set))
|
||||
{
|
||||
|
||||
if(!xmms_cfg_read_string(cfg, "flac", "file_char_set", &flac_cfg.file_char_set))
|
||||
flac_cfg.file_char_set = get_current_charset();
|
||||
}
|
||||
if (!xmms_cfg_read_string(cfg, "flac", "user_char_set",
|
||||
&flac_cfg.user_char_set))
|
||||
{
|
||||
|
||||
if(!xmms_cfg_read_string(cfg, "flac", "user_char_set", &flac_cfg.user_char_set))
|
||||
flac_cfg.user_char_set = get_current_charset();
|
||||
}
|
||||
|
||||
decoder_ = FLAC__file_decoder_new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user