added forked 'speaker' lib and changed a lot of stuff

This commit is contained in:
Daniel Sommer 2022-04-27 15:41:46 +02:00
parent 80179e4bfa
commit 3a4cc2775d
264 changed files with 117857 additions and 0 deletions

171
libs/speaker/History.md Normal file
View file

@ -0,0 +1,171 @@
0.3.0 / 2016-04-09
==================
* Update to latest version win32.c
* README: use SVG for appveyor badge
0.2.6 / 2015-09-24
==================
* more travis/appveyor testing
* src: modification so it works with nan@2 (#64, @santigimeno)
* fix compile with io.js 2.1.0 on Linux (#56, @bradjc)
* made it compile on freebsd (#55, @antxxxx)
0.2.5 / 2015-04-15
==================
* package: update "bindings" to v1.2.1
* package: update "nan" to v1.7.0
* appveyor: test node v0.12, don't test v0.11
* travis: test node v0.12, don't test v0.11
0.2.4 / 2015-02-20
==================
* update "nan" to v1.6.2
* update binding.cc for node v0.12 / iojs support (#47, @mrinalvirnave)
0.2.3 / 2015-02-20
==================
* link pulse-simple when using mpg123 "pulse" backend (#48, @ReneHollander)
0.2.2 / 2015-01-13
==================
* example: make sine.js produce 220hz, not 440hz (#38, @jproulx)
* package: update "mocha" to v2.1.0
* package: allow any "debug" v2
* package: add "bugs" and "homepage" fields
* travis: remove unused "matrix" field
0.2.1 / 2014-07-07
==================
* src: call open() and close() on the dummy audio_output_t instance (#36)
* README: document the `float` format option
0.2.0 / 2014-06-22
==================
* gitignore: ignore root-level dev files
* index: pass the `format` directly to the native open() binding
* index: ensure a valid and supported "format" is given to Speaker instance
* test: add quotes to test names
* index: add `getFormat()` and `isSupported()` functions
* binding: export the `MPG123_ENC_*` constants
* binding: export the result of `get_formats()`
* mpg123: add 64-bit float playback support for CoreAudio backend
* index: use %o formatter some more
* index: default `float` to 32-bit `bitDepth`
0.1.3 / 2014-06-15
==================
* index: do not call `flush()` binding when the stream finishes "naturally"
* index: use %o formatting from debug v1
* package: update "nan" to v1.2.0
* package: update "debug" to v1.0.0
0.1.2 / 2014-06-02
==================
* package: update "nan" to v1.1.2
* package: update "mocha" dev dependency
0.1.1 / 2014-05-27
==================
* binding: update to nan v1.1.0 API, fixes node v0.11.13+
* add appveyor.yml file for Windows testing
* README: add appveyor build badge
* README: use svg for travis badge
* travis: don't test node v0.9.x
* index: make _format() bind to the speaker instance
* don't leave event listeners behind (#22, @LinusU)
0.1.0 / 2014-04-17
==================
* index: abort write() call if `_close` is set (#28, #29)
* package: tighten up the dependencies' versions
* index: add a debug() call
* index: emit "close" after setting `_closed`
* index: use the "readable-stream" copy of Writable
* package: pin "readable-stream" to any v1.0.x
* examples: fix "sine" emitting "end" event
* travis: test node v0.11
* use `rvagg/nan`
* fix History.md note
* fix sinewave example on 0.10 (Stream API changes) (#12, @jfmatt)
0.0.10 / 2013-05-08
===================
* pass the "open" error to the Speaker instance. Closes #7.
* package: add "sound" as a keyword
* travis: test node v0.10
0.0.9 / 2013-03-06
==================
* update for v0.9.12 Writable stream API change
* a couple more jsdoc comments
0.0.8 / 2013-02-10
==================
* throw an Error if non-native endianness is specified
0.0.7 / 2013-01-14
==================
* wait for the `format` event on pipe'd Readable instances
* default the lowWaterMark and highWaterMark to 0
* rename _opts() to _format()
* package: allow any "readable-stream" version
* add a few more debug calls
0.0.6 / 2012-12-15
==================
* add node >= v0.9.4 compat
0.0.5 / 2012-11-16
==================
* add initial tests (uses the "dummy" output module)
* add "float" (32-bit and 64-bit) output support
* ensure only one "close" event
0.0.4 / 2012-11-04
==================
* mpg123: add linux arm support
* guard against bindings that don't have a `deinit()` function
0.0.3 / 2012-11-03
==================
* a two examples to the "examples" dir
* emit an "open" event
* emit a "close" event
* emit a "flush" event
* properly support the "pipe" event
* mpg123: fix a CoreAudio backend compilation warning
* add a timeout after the flush call to ensure the backend has time to play
0.0.2 / 2012-10-25
==================
* support for Windows
* support for Linux
* support for Solaris
* call `flush()` and `close()` at the end of the stream
0.0.1 / 2012-10-24
==================
* Initial release

101
libs/speaker/README.md Normal file
View file

@ -0,0 +1,101 @@
# node-speaker
## Output [PCM audio][pcm] data to the speakers
[![Build Status](https://github.com/TooTallNate/node-speaker/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-speaker/actions?workflow=Node+CI)
A Writable stream instance that accepts [PCM audio][pcm] data and outputs it
to the speakers. The output is backed by `mpg123`'s audio output modules, which
in turn use any number of audio backends commonly found on Operating Systems
these days.
## Installation
Simply compile and install `node-speaker` using `npm`:
```sh
npm install speaker
```
On Debian/Ubuntu, the [ALSA][alsa] backend is selected by default, so be sure
to have the `alsa.h` header file in place:
```sh
sudo apt-get install libasound2-dev
```
## Example
Here's an example of piping `stdin` to the speaker, which should be 2 channel,
16-bit audio at 44,100 samples per second (a.k.a CD quality audio).
```javascript
const Speaker = require('speaker');
// Create the Speaker instance
const speaker = new Speaker({
channels: 2, // 2 channels
bitDepth: 16, // 16-bit samples
sampleRate: 44100 // 44,100 Hz sample rate
});
// PCM data from stdin gets piped into the speaker
process.stdin.pipe(speaker);
```
## API
`require('speaker')` directly returns the `Speaker` constructor. It is the only
interface exported by `node-speaker`.
### new Speaker([ options ]) -> Speaker instance
Creates a new `Speaker` instance, which is a writable stream that you can pipe
PCM audio data to. The optional `options` object may contain any of the `Writable`
base class options, as well as any of these PCM formatting options:
* `channels` - The number of audio channels. PCM data must be interleaved. Defaults to `2`.
* `bitDepth` - The number of bits per sample. Defaults to `16` (16-bit).
* `sampleRate` - The number of samples per second per channel. Defaults to `44100`.
* `signed` - Boolean specifying if the samples are signed or unsigned. Defaults to `true` when bit depth is 8-bit, `false` otherwise.
* `float` - Boolean specifying if the samples are floating-point values. Defaults to `false`.
* `samplesPerFrame` - The number of samples to send to the audio backend at a time. You likely don't need to mess with this value. Defaults to `1024`.
* `device` - The name of the playback device. E.g. `'hw:0,0'` for first device of first sound card or `'hw:1,0'` for first device of second sound card. Defaults to `null` which will pick the default device.
#### "open" event
Fired when the backend `open()` call has completed. This happens once the first
`write()` call happens on the speaker instance.
#### "flush" event
Fired after the speaker instance has had `end()` called, and after the audio data
has been flushed to the speakers.
#### "close" event
Fired after the "flush" event, after the backend `close()` call has completed.
This speaker instance is essentially finished after this point.
## Audio Backend Selection
`node-speaker` is backed by `mpg123`'s "output modules", which in turn use one of
many popular audio backends like ALSA, OSS, SDL, and lots more. The default
backends for each operating system are described in the table below:
| **Operating System** | **Audio Backend** | **Description**
|:---------------------|:------------------|:----------------------------------
| Linux | `alsa` | Output audio using [Advanced Linux Sound Architecture (ALSA)][alsa].
| Mac OS X | `coreaudio` | Output audio using Mac OS X's CoreAudio.
| Windows | `win32` | Audio output for Windows (winmm).
| Solaris | `sun` | Audio output for Sun Audio.
To manually override the default backend, pass the `--mpg123-backend` switch to
`npm`/`node-gyp`:
```sh
npm install speaker --mpg123-backend=openal
```
[pcm]: http://en.wikipedia.org/wiki/Pulse-code_modulation
[alsa]: http://www.alsa-project.org/

13
libs/speaker/binding.gyp Normal file
View file

@ -0,0 +1,13 @@
{
'targets': [
{
'target_name': 'binding',
'sources': [
'src/binding.c',
],
'dependencies': [
'deps/mpg123/mpg123.gyp:output'
],
}
]
}

344
libs/speaker/build/Makefile Normal file
View file

@ -0,0 +1,344 @@
# We borrow heavily from the kernel build setup, though we are simpler since
# we don't have Kconfig tweaking settings on us.
# The implicit make rules have it looking for RCS files, among other things.
# We instead explicitly write all the rules we care about.
# It's even quicker (saves ~200ms) to pass -r on the command line.
MAKEFLAGS=-r
# The source directory tree.
srcdir := ..
abs_srcdir := $(abspath $(srcdir))
# The name of the builddir.
builddir_name ?= .
# The V=1 flag on command line makes us verbosely print command lines.
ifdef V
quiet=
else
quiet=quiet_
endif
# Specify BUILDTYPE=Release on the command line for a release build.
BUILDTYPE ?= Release
# Directory all our build output goes into.
# Note that this must be two directories beneath src/ for unit tests to pass,
# as they reach into the src/ directory for data with relative paths.
builddir ?= $(builddir_name)/$(BUILDTYPE)
abs_builddir := $(abspath $(builddir))
depsdir := $(builddir)/.deps
# Object output directory.
obj := $(builddir)/obj
abs_obj := $(abspath $(obj))
# We build up a list of every single one of the targets so we can slurp in the
# generated dependency rule Makefiles in one pass.
all_deps :=
CC.target ?= $(CC)
CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
CXX.target ?= $(CXX)
CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
LINK.target ?= $(LINK)
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
# C++ apps need to be linked with g++.
LINK ?= $(CXX.target)
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
CC.host ?= gcc
CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
CXX.host ?= g++
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
LINK.host ?= $(CXX.host)
LDFLAGS.host ?= $(LDFLAGS_host)
AR.host ?= ar
# Define a dir function that can handle spaces.
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
# "leading spaces cannot appear in the text of the first argument as written.
# These characters can be put into the argument value by variable substitution."
empty :=
space := $(empty) $(empty)
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
replace_spaces = $(subst $(space),?,$1)
unreplace_spaces = $(subst ?,$(space),$1)
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
# Flags to make gcc output dependency info. Note that you need to be
# careful here to use the flags that ccache and distcc can understand.
# We write to a dep file on the side first and then rename at the end
# so we can't end up with a broken dep file.
depfile = $(depsdir)/$(call replace_spaces,$@).d
DEPFLAGS = -MMD -MF $(depfile).raw
# We have to fixup the deps output in a few ways.
# (1) the file output should mention the proper .o file.
# ccache or distcc lose the path to the target, so we convert a rule of
# the form:
# foobar.o: DEP1 DEP2
# into
# path/to/foobar.o: DEP1 DEP2
# (2) we want missing files not to cause us to fail to build.
# We want to rewrite
# foobar.o: DEP1 DEP2 \
# DEP3
# to
# DEP1:
# DEP2:
# DEP3:
# so if the files are missing, they're just considered phony rules.
# We have to do some pretty insane escaping to get those backslashes
# and dollar signs past make, the shell, and sed at the same time.
# Doesn't work with spaces, but that's fine: .d files have spaces in
# their names replaced with other characters.
define fixup_dep
# The depfile may not exist if the input file didn't have any #includes.
touch $(depfile).raw
# Fixup path as in (1).
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
# Add extra rules as in (2).
# We remove slashes and replace spaces with new lines;
# remove blank lines;
# delete the first line and append a colon to the remaining lines.
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
grep -v '^$$' |\
sed -e 1d -e 's|$$|:|' \
>> $(depfile)
rm $(depfile).raw
endef
# Command definitions:
# - cmd_foo is the actual command to run;
# - quiet_cmd_foo is the brief-output summary of the command.
quiet_cmd_cc = CC($(TOOLSET)) $@
cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c
quiet_cmd_cxx = CXX($(TOOLSET)) $@
cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c
quiet_cmd_touch = TOUCH $@
cmd_touch = touch $@
quiet_cmd_copy = COPY $@
# send stderr to /dev/null to ignore messages when linking directories.
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
quiet_cmd_alink = AR($(TOOLSET)) $@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
# 2) loadable_module, which is generating a module intended for dlopen().
#
# They differ only slightly:
# In the former case, we want to package all dependent code into the .so.
# In the latter case, we want to package just the API exposed by the
# outermost module.
# This means shared_library uses --whole-archive, while loadable_module doesn't.
# (Note that --whole-archive is incompatible with the --start-group used in
# normal linking.)
# Other shared-object link notes:
# - Set SONAME to the library filename so our binaries don't reference
# the local, absolute paths used on the link command-line.
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
# Define an escape_quotes function to escape single quotes.
# This allows us to handle quotes properly as long as we always use
# use single quotes and escape_quotes.
escape_quotes = $(subst ','\'',$(1))
# This comment is here just to include a ' to unconfuse syntax highlighting.
# Define an escape_vars function to escape '$' variable syntax.
# This allows us to read/write command lines with shell variables (e.g.
# $LD_LIBRARY_PATH), without triggering make substitution.
escape_vars = $(subst $$,$$$$,$(1))
# Helper that expands to a shell command to echo a string exactly as it is in
# make. This uses printf instead of echo because printf's behaviour with respect
# to escape sequences is more portable than echo's across different shells
# (e.g., dash, bash).
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
# Helper to compare the command we're about to run against the command
# we logged the last time we ran the command. Produces an empty
# string (false) when the commands match.
# Tricky point: Make has no string-equality test function.
# The kernel uses the following, but it seems like it would have false
# positives, where one string reordered its arguments.
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
# $(filter-out $(cmd_$@), $(cmd_$(1))))
# We instead substitute each for the empty string into the other, and
# say they're equal if both substitutions produce the empty string.
# .d files contain ? instead of spaces, take that into account.
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
# Helper that is non-empty when a prerequisite changes.
# Normally make does this implicitly, but we force rules to always run
# so we can check their command lines.
# $? -- new prerequisites
# $| -- order-only dependencies
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
# Helper that executes all postbuilds until one fails.
define do_postbuilds
@E=0;\
for p in $(POSTBUILDS); do\
eval $$p;\
E=$$?;\
if [ $$E -ne 0 ]; then\
break;\
fi;\
done;\
if [ $$E -ne 0 ]; then\
rm -rf "$@";\
exit $$E;\
fi
endef
# do_cmd: run a command via the above cmd_foo names, if necessary.
# Should always run for a given target to handle command-line changes.
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
# Third argument, if non-zero, makes it do POSTBUILDS processing.
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
# spaces already and dirx strips the ? characters.
define do_cmd
$(if $(or $(command_changed),$(prereq_changed)),
@$(call exact_echo, $($(quiet)cmd_$(1)))
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
$(if $(findstring flock,$(word 1,$(cmd_$1))),
@$(cmd_$(1))
@echo " $(quiet_cmd_$(1)): Finished",
@$(cmd_$(1))
)
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
@$(if $(2),$(fixup_dep))
$(if $(and $(3), $(POSTBUILDS)),
$(call do_postbuilds)
)
)
endef
# Declare the "all" target first so it is the default,
# even though we don't have the deps yet.
.PHONY: all
all:
# make looks for ways to re-generate included makefiles, but in our case, we
# don't have a direct way. Explicitly telling make that it has nothing to do
# for them makes it go faster.
%.d: ;
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
# do_cmd.
.PHONY: FORCE_DO_CMD
FORCE_DO_CMD:
TOOLSET := target
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,binding.target.mk)))),)
include binding.target.mk
endif
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,deps/mpg123/mpg123.target.mk)))),)
include deps/mpg123/mpg123.target.mk
endif
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,deps/mpg123/output.target.mk)))),)
include deps/mpg123/output.target.mk
endif
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,deps/mpg123/output_test.target.mk)))),)
include deps/mpg123/output_test.target.mk
endif
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,deps/mpg123/test.target.mk)))),)
include deps/mpg123/test.target.mk
endif
quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /home/velvettear/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/velvettear/.cache/node-gyp/18.0.0" "-Dnode_gyp_dir=/home/velvettear/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/home/velvettear/.cache/node-gyp/18.0.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/velvettear/development/nodejs/kannon-client/libs/speaker" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/velvettear/development/nodejs/kannon-client/libs/speaker/build/config.gypi -I/home/velvettear/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/velvettear/.cache/node-gyp/18.0.0/include/node/common.gypi "--toplevel-dir=." binding.gyp
Makefile: $(srcdir)/binding.gyp $(srcdir)/build/config.gypi $(srcdir)/../../../../../.cache/node-gyp/18.0.0/include/node/common.gypi $(srcdir)/deps/mpg123/mpg123.gyp $(srcdir)/../../../../../.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
$(call do_cmd,regen_makefile)
# "all" is a concatenation of the "all" targets from all the included
# sub-makefiles. This is just here to clarify.
all:
# Add in dependency-tracking rules. $(all_deps) is the list of every single
# target in our tree. Only consider the ones with .d (dependency) info:
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
ifneq ($(d_files),)
include $(d_files)
endif

View file

@ -0,0 +1 @@
cmd_Release/binding.node := ln -f "Release/obj.target/binding.node" "Release/binding.node" 2>/dev/null || (rm -rf "Release/binding.node" && cp -af "Release/obj.target/binding.node" "Release/binding.node")

View file

@ -0,0 +1 @@
cmd_Release/liboutput.a := ln -f "Release/obj.target/deps/mpg123/liboutput.a" "Release/liboutput.a" 2>/dev/null || (rm -rf "Release/liboutput.a" && cp -af "Release/obj.target/deps/mpg123/liboutput.a" "Release/liboutput.a")

View file

@ -0,0 +1 @@
cmd_Release/obj.target/binding.node := g++ -o Release/obj.target/binding.node -shared -pthread -rdynamic -m64 -Wl,-soname=binding.node -Wl,--start-group Release/obj.target/binding/src/binding.o Release/obj.target/deps/mpg123/liboutput.a -Wl,--end-group -lasound

View file

@ -0,0 +1,24 @@
cmd_Release/obj.target/binding/src/binding.o := cc -o Release/obj.target/binding/src/binding.o ../src/binding.c '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/home/velvettear/.cache/node-gyp/18.0.0/include/node -I/home/velvettear/.cache/node-gyp/18.0.0/src -I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config -I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include -I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include -I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib -I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include -I../deps/mpg123/src -I../deps/mpg123/src/output -I../deps/mpg123/src/libmpg123 -I../deps/mpg123/config/linux/x64 -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw -c
Release/obj.target/binding/src/binding.o: ../src/binding.c \
/home/velvettear/.cache/node-gyp/18.0.0/include/node/node_api.h \
/home/velvettear/.cache/node-gyp/18.0.0/include/node/js_native_api.h \
/home/velvettear/.cache/node-gyp/18.0.0/include/node/js_native_api_types.h \
/home/velvettear/.cache/node-gyp/18.0.0/include/node/node_api_types.h \
../deps/mpg123/src/output/output.h \
../deps/mpg123/config/linux/x64/mpg123.h ../deps/mpg123/src/module.h \
../deps/mpg123/src/audio.h ../deps/mpg123/src/libmpg123/compat.h \
../deps/mpg123/config/linux/x64/config.h \
../deps/mpg123/src/libmpg123/intsym.h ../deps/mpg123/src/module.h
../src/binding.c:
/home/velvettear/.cache/node-gyp/18.0.0/include/node/node_api.h:
/home/velvettear/.cache/node-gyp/18.0.0/include/node/js_native_api.h:
/home/velvettear/.cache/node-gyp/18.0.0/include/node/js_native_api_types.h:
/home/velvettear/.cache/node-gyp/18.0.0/include/node/node_api_types.h:
../deps/mpg123/src/output/output.h:
../deps/mpg123/config/linux/x64/mpg123.h:
../deps/mpg123/src/module.h:
../deps/mpg123/src/audio.h:
../deps/mpg123/src/libmpg123/compat.h:
../deps/mpg123/config/linux/x64/config.h:
../deps/mpg123/src/libmpg123/intsym.h:
../deps/mpg123/src/module.h:

View file

@ -0,0 +1 @@
cmd_Release/obj.target/deps/mpg123/liboutput.a := rm -f Release/obj.target/deps/mpg123/liboutput.a && ar crs Release/obj.target/deps/mpg123/liboutput.a Release/obj.target/output/deps/mpg123/src/output/alsa.o

View file

@ -0,0 +1,24 @@
cmd_Release/obj.target/output/deps/mpg123/src/output/alsa.o := cc -o Release/obj.target/output/deps/mpg123/src/output/alsa.o ../deps/mpg123/src/output/alsa.c '-DNODE_GYP_MODULE_NAME=output' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DPIC' '-DNOXFERMEM' '-DREAL_IS_FLOAT' '-DHAVE_CONFIG_H' '-DBUILDING_OUTPUT_MODULES=1' '-DNDEBUG' -I/home/velvettear/.cache/node-gyp/18.0.0/include/node -I/home/velvettear/.cache/node-gyp/18.0.0/src -I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config -I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include -I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include -I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib -I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include -I../deps/mpg123/src -I../deps/mpg123/src/output -I../deps/mpg123/src/libmpg123 -I../deps/mpg123/config/linux/x64 -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/output/deps/mpg123/src/output/alsa.o.d.raw -c
Release/obj.target/output/deps/mpg123/src/output/alsa.o: \
../deps/mpg123/src/output/alsa.c ../deps/mpg123/src/mpg123app.h \
../deps/mpg123/config/linux/x64/config.h \
../deps/mpg123/src/libmpg123/compat.h \
../deps/mpg123/src/libmpg123/intsym.h ../deps/mpg123/src/xfermem.h \
../deps/mpg123/src/httpget.h ../deps/mpg123/config/linux/x64/mpg123.h \
../deps/mpg123/src/audio.h ../deps/mpg123/src/module.h \
../deps/mpg123/src/local.h ../deps/mpg123/src/audio.h \
../deps/mpg123/src/module.h ../deps/mpg123/src/libmpg123/debug.h
../deps/mpg123/src/output/alsa.c:
../deps/mpg123/src/mpg123app.h:
../deps/mpg123/config/linux/x64/config.h:
../deps/mpg123/src/libmpg123/compat.h:
../deps/mpg123/src/libmpg123/intsym.h:
../deps/mpg123/src/xfermem.h:
../deps/mpg123/src/httpget.h:
../deps/mpg123/config/linux/x64/mpg123.h:
../deps/mpg123/src/audio.h:
../deps/mpg123/src/module.h:
../deps/mpg123/src/local.h:
../deps/mpg123/src/audio.h:
../deps/mpg123/src/module.h:
../deps/mpg123/src/libmpg123/debug.h:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,6 @@
# This file is generated by gyp; do not edit.
export builddir_name ?= ./build/.
.PHONY: all
all:
$(MAKE) binding

View file

@ -0,0 +1,171 @@
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := binding
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=binding' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DBUILDING_NODE_EXTENSION' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Debug := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src \
-I$(srcdir)/deps/mpg123/src/output \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=binding' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DBUILDING_NODE_EXTENSION'
# Flags passed to all source files.
CFLAGS_Release := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-O3 \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Release := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src \
-I$(srcdir)/deps/mpg123/src/output \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
OBJS := \
$(obj).target/$(TARGET)/src/binding.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# Make sure our dependencies are built before any of us.
$(OBJS): | $(builddir)/liboutput.a $(obj).target/deps/mpg123/liboutput.a
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-pthread \
-rdynamic \
-m64
LDFLAGS_Release := \
-pthread \
-rdynamic \
-m64
LIBS := \
-lasound
$(obj).target/binding.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/binding.node: LIBS := $(LIBS)
$(obj).target/binding.node: TOOLSET := $(TOOLSET)
$(obj).target/binding.node: $(OBJS) $(obj).target/deps/mpg123/liboutput.a FORCE_DO_CMD
$(call do_cmd,solink_module)
all_deps += $(obj).target/binding.node
# Add target alias
.PHONY: binding
binding: $(builddir)/binding.node
# Copy this to the executable output path.
$(builddir)/binding.node: TOOLSET := $(TOOLSET)
$(builddir)/binding.node: $(obj).target/binding.node FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/binding.node
# Short alias for building this executable.
.PHONY: binding.node
binding.node: $(obj).target/binding.node $(builddir)/binding.node
# Add executable to "all" target.
.PHONY: all
all: $(builddir)/binding.node

View file

@ -0,0 +1,380 @@
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"coverage": "false",
"dcheck_always_on": 0,
"debug_nghttp2": "false",
"debug_node": "false",
"enable_lto": "false",
"enable_pgo_generate": "false",
"enable_pgo_use": "false",
"error_on_warn": "false",
"force_dynamic_crt": 0,
"gas_version": "2.30",
"host_arch": "x64",
"icu_data_in": "../../deps/icu-tmp/icudt71l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_path": "deps/icu-small",
"icu_small": "false",
"icu_ver_major": "71",
"is_debug": 0,
"llvm_version": "0.0",
"napi_build_version": "8",
"node_byteorder": "little",
"node_debug_lib": "false",
"node_enable_d8": "false",
"node_fipsinstall": "false",
"node_install_corepack": "true",
"node_install_npm": "true",
"node_library_files": [
"lib/_http_incoming.js",
"lib/_http_outgoing.js",
"lib/_stream_duplex.js",
"lib/_stream_passthrough.js",
"lib/_stream_readable.js",
"lib/_stream_transform.js",
"lib/_stream_wrap.js",
"lib/_stream_writable.js",
"lib/_tls_common.js",
"lib/_tls_wrap.js",
"lib/cluster.js",
"lib/console.js",
"lib/constants.js",
"lib/diagnostics_channel.js",
"lib/domain.js",
"lib/events.js",
"lib/http.js",
"lib/http2.js",
"lib/inspector.js",
"lib/module.js",
"lib/path.js",
"lib/perf_hooks.js",
"lib/process.js",
"lib/punycode.js",
"lib/querystring.js",
"lib/readline.js",
"lib/stream.js",
"lib/sys.js",
"lib/timers.js",
"lib/tls.js",
"lib/trace_events.js",
"lib/tty.js",
"lib/util.js",
"lib/v8.js",
"lib/vm.js",
"lib/wasi.js",
"lib/worker_threads.js",
"lib/zlib.js",
"lib/_http_agent.js",
"lib/async_hooks.js",
"lib/string_decoder.js",
"lib/crypto.js",
"lib/assert.js",
"lib/url.js",
"lib/repl.js",
"lib/test.js",
"lib/dgram.js",
"lib/child_process.js",
"lib/fs.js",
"lib/buffer.js",
"lib/dns.js",
"lib/net.js",
"lib/os.js",
"lib/_http_client.js",
"lib/_http_common.js",
"lib/_http_server.js",
"lib/https.js",
"lib/assert/strict.js",
"lib/dns/promises.js",
"lib/fs/promises.js",
"lib/internal/assert.js",
"lib/internal/blocklist.js",
"lib/internal/buffer.js",
"lib/internal/child_process.js",
"lib/internal/cli_table.js",
"lib/internal/constants.js",
"lib/internal/dgram.js",
"lib/internal/dtrace.js",
"lib/internal/encoding.js",
"lib/internal/error_serdes.js",
"lib/internal/fixed_queue.js",
"lib/internal/freelist.js",
"lib/internal/freeze_intrinsics.js",
"lib/internal/heap_utils.js",
"lib/internal/histogram.js",
"lib/internal/idna.js",
"lib/internal/inspector_async_hook.js",
"lib/internal/linkedlist.js",
"lib/internal/net.js",
"lib/internal/priority_queue.js",
"lib/internal/promise_hooks.js",
"lib/internal/querystring.js",
"lib/internal/repl.js",
"lib/internal/socket_list.js",
"lib/internal/socketaddress.js",
"lib/internal/stream_base_commons.js",
"lib/internal/structured_clone.js",
"lib/internal/trace_events_async_hooks.js",
"lib/internal/tty.js",
"lib/internal/util.js",
"lib/internal/v8_prof_polyfill.js",
"lib/internal/v8_prof_processor.js",
"lib/internal/watchdog.js",
"lib/internal/worker.js",
"lib/internal/url.js",
"lib/internal/http.js",
"lib/internal/abort_controller.js",
"lib/internal/event_target.js",
"lib/internal/options.js",
"lib/internal/validators.js",
"lib/internal/async_hooks.js",
"lib/internal/blob.js",
"lib/internal/js_stream_socket.js",
"lib/internal/timers.js",
"lib/internal/errors.js",
"lib/internal/assert/assertion_error.js",
"lib/internal/assert/calltracker.js",
"lib/internal/bootstrap/environment.js",
"lib/internal/bootstrap/node.js",
"lib/internal/bootstrap/loaders.js",
"lib/internal/bootstrap/pre_execution.js",
"lib/internal/bootstrap/browser.js",
"lib/internal/bootstrap/switches/does_not_own_process_state.js",
"lib/internal/bootstrap/switches/does_own_process_state.js",
"lib/internal/bootstrap/switches/is_not_main_thread.js",
"lib/internal/bootstrap/switches/is_main_thread.js",
"lib/internal/child_process/serialization.js",
"lib/internal/cluster/child.js",
"lib/internal/cluster/primary.js",
"lib/internal/cluster/round_robin_handle.js",
"lib/internal/cluster/shared_handle.js",
"lib/internal/cluster/utils.js",
"lib/internal/cluster/worker.js",
"lib/internal/console/constructor.js",
"lib/internal/console/global.js",
"lib/internal/crypto/aes.js",
"lib/internal/crypto/certificate.js",
"lib/internal/crypto/cipher.js",
"lib/internal/crypto/diffiehellman.js",
"lib/internal/crypto/ec.js",
"lib/internal/crypto/hash.js",
"lib/internal/crypto/hashnames.js",
"lib/internal/crypto/hkdf.js",
"lib/internal/crypto/mac.js",
"lib/internal/crypto/pbkdf2.js",
"lib/internal/crypto/rsa.js",
"lib/internal/crypto/scrypt.js",
"lib/internal/crypto/sig.js",
"lib/internal/crypto/keys.js",
"lib/internal/crypto/random.js",
"lib/internal/crypto/x509.js",
"lib/internal/crypto/dsa.js",
"lib/internal/crypto/keygen.js",
"lib/internal/crypto/util.js",
"lib/internal/crypto/webcrypto.js",
"lib/internal/debugger/inspect.js",
"lib/internal/debugger/inspect_client.js",
"lib/internal/debugger/inspect_repl.js",
"lib/internal/dns/promises.js",
"lib/internal/dns/utils.js",
"lib/internal/fs/dir.js",
"lib/internal/fs/read_file_context.js",
"lib/internal/fs/rimraf.js",
"lib/internal/fs/streams.js",
"lib/internal/fs/sync_write_stream.js",
"lib/internal/fs/watchers.js",
"lib/internal/fs/promises.js",
"lib/internal/fs/utils.js",
"lib/internal/fs/cp/cp-sync.js",
"lib/internal/fs/cp/cp.js",
"lib/internal/http2/compat.js",
"lib/internal/http2/core.js",
"lib/internal/http2/util.js",
"lib/internal/legacy/processbinding.js",
"lib/internal/main/check_syntax.js",
"lib/internal/main/eval_stdin.js",
"lib/internal/main/eval_string.js",
"lib/internal/main/inspect.js",
"lib/internal/main/print_help.js",
"lib/internal/main/prof_process.js",
"lib/internal/main/repl.js",
"lib/internal/main/run_main_module.js",
"lib/internal/main/worker_thread.js",
"lib/internal/main/mksnapshot.js",
"lib/internal/modules/package_json_reader.js",
"lib/internal/modules/run_main.js",
"lib/internal/modules/cjs/helpers.js",
"lib/internal/modules/cjs/loader.js",
"lib/internal/modules/esm/assert.js",
"lib/internal/modules/esm/create_dynamic_module.js",
"lib/internal/modules/esm/fetch_module.js",
"lib/internal/modules/esm/get_source.js",
"lib/internal/modules/esm/handle_process_exit.js",
"lib/internal/modules/esm/load.js",
"lib/internal/modules/esm/module_map.js",
"lib/internal/modules/esm/initialize_import_meta.js",
"lib/internal/modules/esm/module_job.js",
"lib/internal/modules/esm/translators.js",
"lib/internal/modules/esm/formats.js",
"lib/internal/modules/esm/get_format.js",
"lib/internal/modules/esm/loader.js",
"lib/internal/modules/esm/resolve.js",
"lib/internal/per_context/domexception.js",
"lib/internal/per_context/messageport.js",
"lib/internal/per_context/primordials.js",
"lib/internal/perf/event_loop_delay.js",
"lib/internal/perf/event_loop_utilization.js",
"lib/internal/perf/nodetiming.js",
"lib/internal/perf/performance_entry.js",
"lib/internal/perf/timerify.js",
"lib/internal/perf/usertiming.js",
"lib/internal/perf/utils.js",
"lib/internal/perf/performance.js",
"lib/internal/perf/observe.js",
"lib/internal/policy/manifest.js",
"lib/internal/policy/sri.js",
"lib/internal/process/execution.js",
"lib/internal/process/per_thread.js",
"lib/internal/process/policy.js",
"lib/internal/process/promises.js",
"lib/internal/process/report.js",
"lib/internal/process/signal.js",
"lib/internal/process/task_queues.js",
"lib/internal/process/warning.js",
"lib/internal/process/worker_thread_only.js",
"lib/internal/process/esm_loader.js",
"lib/internal/readline/callbacks.js",
"lib/internal/readline/emitKeypressEvents.js",
"lib/internal/readline/promises.js",
"lib/internal/readline/utils.js",
"lib/internal/readline/interface.js",
"lib/internal/repl/await.js",
"lib/internal/repl/history.js",
"lib/internal/repl/utils.js",
"lib/internal/source_map/source_map.js",
"lib/internal/source_map/source_map_cache.js",
"lib/internal/source_map/prepare_stack_trace.js",
"lib/internal/streams/add-abort-signal.js",
"lib/internal/streams/buffer_list.js",
"lib/internal/streams/compose.js",
"lib/internal/streams/duplex.js",
"lib/internal/streams/duplexify.js",
"lib/internal/streams/end-of-stream.js",
"lib/internal/streams/from.js",
"lib/internal/streams/lazy_transform.js",
"lib/internal/streams/legacy.js",
"lib/internal/streams/operators.js",
"lib/internal/streams/passthrough.js",
"lib/internal/streams/state.js",
"lib/internal/streams/utils.js",
"lib/internal/streams/pipeline.js",
"lib/internal/streams/destroy.js",
"lib/internal/streams/readable.js",
"lib/internal/streams/transform.js",
"lib/internal/streams/writable.js",
"lib/internal/test/binding.js",
"lib/internal/test/transfer.js",
"lib/internal/tls/secure-context.js",
"lib/internal/tls/secure-pair.js",
"lib/internal/util/comparisons.js",
"lib/internal/util/debuglog.js",
"lib/internal/util/inspect.js",
"lib/internal/util/inspector.js",
"lib/internal/util/iterable_weak_map.js",
"lib/internal/util/types.js",
"lib/internal/vm/module.js",
"lib/internal/webstreams/compression.js",
"lib/internal/webstreams/encoding.js",
"lib/internal/webstreams/queuingstrategies.js",
"lib/internal/webstreams/transfer.js",
"lib/internal/webstreams/transformstream.js",
"lib/internal/webstreams/util.js",
"lib/internal/webstreams/writablestream.js",
"lib/internal/webstreams/adapters.js",
"lib/internal/webstreams/readablestream.js",
"lib/internal/worker/io.js",
"lib/internal/worker/js_transferable.js",
"lib/internal/test_runner/harness.js",
"lib/internal/test_runner/tap_stream.js",
"lib/internal/test_runner/test.js",
"lib/path/posix.js",
"lib/path/win32.js",
"lib/readline/promises.js",
"lib/stream/consumers.js",
"lib/stream/promises.js",
"lib/stream/web.js",
"lib/timers/promises.js",
"lib/util/types.js"
],
"node_module_version": 108,
"node_no_browser_globals": "false",
"node_prefix": "/",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_section_ordering_info": "",
"node_shared": "false",
"node_shared_brotli": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_nghttp2": "false",
"node_shared_nghttp3": "false",
"node_shared_ngtcp2": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_tag": "",
"node_target_type": "executable",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "false",
"node_use_node_code_cache": "true",
"node_use_node_snapshot": "true",
"node_use_openssl": "true",
"node_use_v8_platform": "true",
"node_with_ltcg": "false",
"node_without_node_options": "false",
"openssl_is_fips": "false",
"openssl_quic": "true",
"ossfuzz": "false",
"shlib_suffix": "so.108",
"target_arch": "x64",
"v8_enable_31bit_smis_on_64bit_arch": 0,
"v8_enable_gdbjit": 0,
"v8_enable_hugepage": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_enable_javascript_promise_hooks": 1,
"v8_enable_lite_mode": 0,
"v8_enable_object_print": 1,
"v8_enable_pointer_compression": 0,
"v8_enable_short_builtin_calls": 1,
"v8_enable_webassembly": 1,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 1,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_siphash": 1,
"want_separate_host_toolset": 0,
"nodedir": "/home/velvettear/.cache/node-gyp/18.0.0",
"standalone_static_library": 1,
"userconfig": "/home/velvettear/.npmrc",
"cache": "/home/velvettear/.npm",
"local_prefix": "/home/velvettear/development/nodejs/kannon-client/libs/speaker",
"globalconfig": "/home/velvettear/.nvm/versions/node/v18.0.0/etc/npmrc",
"init_module": "/home/velvettear/.npm-init.js",
"prefix": "/home/velvettear/.nvm/versions/node/v18.0.0",
"user_agent": "npm/8.6.0 node/v18.0.0 linux x64 workspaces/false",
"metrics_registry": "https://registry.npmjs.org/",
"node_gyp": "/home/velvettear/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
"global_prefix": "/home/velvettear/.nvm/versions/node/v18.0.0"
}
}

View file

@ -0,0 +1,6 @@
# This file is generated by gyp; do not edit.
export builddir_name ?= ./build/deps/mpg123/.
.PHONY: all
all:
$(MAKE) -C ../.. output

View file

@ -0,0 +1,212 @@
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := mpg123
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=mpg123' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DPIC' \
'-DNOXFERMEM' \
'-DHAVE_CONFIG_H' \
'-DOPT_X86_64' \
'-DREAL_IS_FLOAT' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Debug := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=mpg123' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DPIC' \
'-DNOXFERMEM' \
'-DHAVE_CONFIG_H' \
'-DOPT_X86_64' \
'-DREAL_IS_FLOAT' \
'-DNDEBUG'
# Flags passed to all source files.
CFLAGS_Release := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-O3 \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Release := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
OBJS := \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/compat.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/parse.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/frame.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/format.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/dct64.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/equalizer.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/id3.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/optimize.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/readers.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/tabinit.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/libmpg123.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/index.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/stringbuf.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/icy.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/icy2utf8.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/ntom.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_8bit.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/layer1.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/layer2.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/layer3.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/feature.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/dct64_x86_64.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/dct64_x86_64_float.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_s32.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_real.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_stereo_x86_64.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_stereo_x86_64_float.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_stereo_x86_64_s32.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_x86_64.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_x86_64_s32.o \
$(obj).target/$(TARGET)/deps/mpg123/src/libmpg123/synth_x86_64_float.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-pthread \
-rdynamic \
-m64
LDFLAGS_Release := \
-pthread \
-rdynamic \
-m64
LIBS :=
$(obj).target/deps/mpg123/libmpg123.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/deps/mpg123/libmpg123.a: LIBS := $(LIBS)
$(obj).target/deps/mpg123/libmpg123.a: TOOLSET := $(TOOLSET)
$(obj).target/deps/mpg123/libmpg123.a: $(OBJS) FORCE_DO_CMD
$(call do_cmd,alink)
all_deps += $(obj).target/deps/mpg123/libmpg123.a
# Add target alias
.PHONY: mpg123
mpg123: $(obj).target/deps/mpg123/libmpg123.a
# Add target alias
.PHONY: mpg123
mpg123: $(builddir)/libmpg123.a
# Copy this to the static library output path.
$(builddir)/libmpg123.a: TOOLSET := $(TOOLSET)
$(builddir)/libmpg123.a: $(obj).target/deps/mpg123/libmpg123.a FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/libmpg123.a
# Short alias for building this static library.
.PHONY: libmpg123.a
libmpg123.a: $(obj).target/deps/mpg123/libmpg123.a $(builddir)/libmpg123.a

View file

@ -0,0 +1,184 @@
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := output
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=output' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DPIC' \
'-DNOXFERMEM' \
'-DREAL_IS_FLOAT' \
'-DHAVE_CONFIG_H' \
'-DBUILDING_OUTPUT_MODULES=1' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Debug := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src \
-I$(srcdir)/deps/mpg123/src/output \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=output' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DPIC' \
'-DNOXFERMEM' \
'-DREAL_IS_FLOAT' \
'-DHAVE_CONFIG_H' \
'-DBUILDING_OUTPUT_MODULES=1' \
'-DNDEBUG'
# Flags passed to all source files.
CFLAGS_Release := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-O3 \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Release := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src \
-I$(srcdir)/deps/mpg123/src/output \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
OBJS := \
$(obj).target/$(TARGET)/deps/mpg123/src/output/alsa.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-pthread \
-rdynamic \
-m64
LDFLAGS_Release := \
-pthread \
-rdynamic \
-m64
LIBS :=
$(obj).target/deps/mpg123/liboutput.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/deps/mpg123/liboutput.a: LIBS := $(LIBS)
$(obj).target/deps/mpg123/liboutput.a: TOOLSET := $(TOOLSET)
$(obj).target/deps/mpg123/liboutput.a: $(OBJS) FORCE_DO_CMD
$(call do_cmd,alink)
all_deps += $(obj).target/deps/mpg123/liboutput.a
# Add target alias
.PHONY: output
output: $(obj).target/deps/mpg123/liboutput.a
# Add target alias to "all" target.
.PHONY: all
all: output
# Add target alias
.PHONY: output
output: $(builddir)/liboutput.a
# Copy this to the static library output path.
$(builddir)/liboutput.a: TOOLSET := $(TOOLSET)
$(builddir)/liboutput.a: $(obj).target/deps/mpg123/liboutput.a FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/liboutput.a
# Short alias for building this static library.
.PHONY: liboutput.a
liboutput.a: $(obj).target/deps/mpg123/liboutput.a $(builddir)/liboutput.a
# Add static library to "all" target.
.PHONY: all
all: $(builddir)/liboutput.a

View file

@ -0,0 +1,157 @@
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := output_test
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=output_test' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Debug := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src \
-I$(srcdir)/deps/mpg123/src/output \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=output_test' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DNDEBUG'
# Flags passed to all source files.
CFLAGS_Release := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-O3 \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Release := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src \
-I$(srcdir)/deps/mpg123/src/output \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
OBJS := \
$(obj).target/$(TARGET)/deps/mpg123/test_output.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# Make sure our dependencies are built before any of us.
$(OBJS): | $(builddir)/liboutput.a $(obj).target/deps/mpg123/liboutput.a
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-pthread \
-rdynamic \
-m64
LDFLAGS_Release := \
-pthread \
-rdynamic \
-m64
LIBS := \
-lasound
$(builddir)/output_test: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(builddir)/output_test: LIBS := $(LIBS)
$(builddir)/output_test: LD_INPUTS := $(OBJS) $(obj).target/deps/mpg123/liboutput.a
$(builddir)/output_test: TOOLSET := $(TOOLSET)
$(builddir)/output_test: $(OBJS) $(obj).target/deps/mpg123/liboutput.a FORCE_DO_CMD
$(call do_cmd,link)
all_deps += $(builddir)/output_test
# Add target alias
.PHONY: output_test
output_test: $(builddir)/output_test

View file

@ -0,0 +1,152 @@
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := test
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=test' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Debug := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=test' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-DNDEBUG'
# Flags passed to all source files.
CFLAGS_Release := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-m64 \
-O3 \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-fno-rtti \
-fno-exceptions \
-std=gnu++17
INCS_Release := \
-I/home/velvettear/.cache/node-gyp/18.0.0/include/node \
-I/home/velvettear/.cache/node-gyp/18.0.0/src \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/config \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/openssl/openssl/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/uv/include \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/zlib \
-I/home/velvettear/.cache/node-gyp/18.0.0/deps/v8/include \
-I$(srcdir)/deps/mpg123/src/libmpg123 \
-I$(srcdir)/deps/mpg123/config/linux/x64
OBJS := \
$(obj).target/$(TARGET)/deps/mpg123/test.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# Make sure our dependencies are built before any of us.
$(OBJS): | $(builddir)/libmpg123.a $(obj).target/deps/mpg123/libmpg123.a
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-pthread \
-rdynamic \
-m64
LDFLAGS_Release := \
-pthread \
-rdynamic \
-m64
LIBS :=
$(builddir)/test: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(builddir)/test: LIBS := $(LIBS)
$(builddir)/test: LD_INPUTS := $(OBJS) $(obj).target/deps/mpg123/libmpg123.a
$(builddir)/test: TOOLSET := $(TOOLSET)
$(builddir)/test: $(OBJS) $(obj).target/deps/mpg123/libmpg123.a FORCE_DO_CMD
$(call do_cmd,link)
all_deps += $(builddir)/test
# Add target alias
.PHONY: test
test: $(builddir)/test

View file

@ -0,0 +1,150 @@
This is an attempt to give credit to the people who contributed in some way to the mpg123 project.
There are names and email addresses listed. Please use these addresses only to contact contributors with some question about their mpg123 contribution.
You are explicitly not allowed to send them unwanted business offers or to question the quality of their sex life.
--------------------
Current maintainers with various sorts of contributions:
Thomas Orgis <thomas@orgis.org>
Patrick Dehne <patrick@steidle.net>
Jonathan Yong <10walls@gmail.com>
Co-initiator of the revived mpg123 project, but not that involved anymore:
Nicholas J Humfrey <njh@ecs.soton.ac.uk>
Generic address pointing to the current maintainer (hopefully still works in future in case maintainership will change again): <maintainer@mpg123.org>
The creator: Michael Hipp (email: hippm@informatik.uni-tuebingen.de - please bother maintainers first)
Contributions/ideas Thomas Orgis era (includes backports from mhipp trunk):
Dan McGee <dpmcgee@gmail.com>: various patches (also for test suite)
Jonathan Yong (jon_y) <10walls@gmail.com>: win32 hacking
Malcolm Boczek <MBoczek@terraindustries.com>: Common language runtime wrapper
Elbert Pol (TeLLie) <elbert.pol@gmail.com>: OS/2 port fixup
Jeroen Valkonet <jvalkon@xs4all.nl>: motivate pitch control, suggestive patch for pitch command in generic control interface
Andy Hefner <ahefner@gmail.com>: patch for that second UTF16 issue
Taihei Monma <tmkk@mac.com>: A whole lot of new/improved assembler code, including Altivec!
Christian Weisgerber <naddy@openbsd.org>, Brad Smith: sndio output
Patrick Dehne (P4tr3ck) <patrick@steidle.net>: more MSVC++ porting, patch to handle missing bit reservoirs
Thorsten Glaser <tg@mirbsd.de>: icy2utf8, suggest utf8 locale stuff
Dan Smith <dan@algenta.com>: ABI fixes for ensuring stack alignment (esp. for MinGW-built DLL with MSVC)
Michael Ryzhykh <mclroy@gmail.com>: mpg123.spec.in
Stefan Lenselink <Stefan@lenselink.org>: initial aRts output
Sergej Kvachonok <ravenexp@gmail.com>: win32 audio rewrite
Winston: SunOS-4.1.4/gcc-2.7.0 testing and suggestions for fixes (legacy Makefile, integer type headers)
Mika Tiainen: pointing out the fix for the UTF to ASCII filtering of tags to actually work
Nick Kurshev <nickols_k@mail.ru>: extended 3dnow (from mplayer)
Zuxy Meng <zuxy.meng@gmail.com>: SSE (from mplayer)
Honza <cundrak@quick.cz>: idea and prototype patch for ICY meta data support
Petr Baudis <pasky@ucw.cz>: patches: term sigcont, id3 display unicode fallback and condensed output
Petr Salinger <Petr.Salinger@seznam.cz>: i486 enhancement
mpdavig@users.sourceforge.net: linux-ppc-nas Makefile.legacy entry
Adrian Bacon <adrian.bacon@xs4all.nl>: patched decode_i586_dither (noise shaped float/int rounding)
Cool Feet Audio project <nutcase@dtfm.org>: realtime equalizer control
Steve Grundell <www@grundell.u-net.com>: clean stdout in control mode with stdout decoding
Romain Dolbeau <romain@dolbeau.org>: Altivec support (taken from mplayer)
higway <higway@mednet.md>: MMX Patch
Clemens Ladisch <clemens@ladisch.de>: ALSA 0.9/1.0 support
Debian Daniel Kobras <kobras@debian.org> era:
Steve Kemp <skx@debian.org>
Dan Olson <theoddone33@icculus.org>
Syuuhei Kashiyama <squash@mb.kcom.ne.jp>
Rupert Levene <rupert.debian@hotpop.com>
Andreas Dilger <adilger@turbolinux.com>
Erik B. Andersen <andersee@debian.org>
Chris Butler <chrisb@debian.org>
Martin Sjogren <md9ms@mdstud.chalmers.se>
Chet Hosey <chosey@budapress.com>
Roland Rosenfeld <roland@spinnaker.de>
Debian Colin Watson <cjwatson@debian.org> era:
Helge Deller <deller@gmx.de>
Chet Hosey <chosey@budapress.com>
Christopher C. Chimelis <chris@debian.org>
Roland Rosenfeld <roland@spinnaker.de>
Marcelo E. Magallon <mmagallo@debian.org>
Initial Debianers:
Tommi Virtanen <tv@debian.org>
Paul Haggart <phaggart@debian.org>
Contributions/ideas Michael Hipp era:
Mikko Tommila: DCT9
Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
MPEG Software Simulation Group: reference decoder package
Tobias Bading: idea for DCT64 in subband synthesis from maplay package
Jeff Tsay and Mikko Tommila: MDCT36 from maplay package
Philipp Knirsch <phil@mpik-tueb.mpg.de>: DCT36/manual unroll idea
Thomas Woerner: SGI Audio
Damien Clermonte: HP-UX audio fixes
Niclas Lindstrom <nil@wineasy.se>: OS2 port
Stefan Bieschewski <stb@acm.org>: Pentium optimizations, decode_i586.s
Martin Denn <mdenn@unix-ag.uni-kl.de>: NAS port
Niklas Beisert <nbeisert@physik.tu-muenchen.de>: MPEG 2.5 tables
<mycroft@NetBSD.ORG> and <augustss@cs.chalmers.se>: NetBSD Patch(es)
Kevin Brintnall <kbrint@visi.com>: BSD patch
Tony Million: win32 port
Steven Tiger Lang: advanced shuffle
Eric B. Mitchell: esd port
Ryan R. Prosser <prosser@geocities.com>: esd port for Solaris
Andreas Neuhaus: initial generic control interface
(additionally fetched from changelog:)
Ralf Hildebrandt <R.Hildebrandt@TU-BS.DE>: audio_alib changes
<sms@moe.2bsd.com>: BSDOS 4.0 with gcc added to Makefile
Bertrand Petit <elrond@phoe.netdev.net>: frontend changes
Erik Mouw <J.A.K.Mouw@its.tudelft.nl>: SGI audio fix for non RAD machines
Daniel O'Connor <darius@guppy.dons.net.au>: freebsd-esd make-entry
D. Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>: enhanced head_check
Wilson, Jeff D <jeff.wilson@wilcom.com>: xterm-title
Robert Bihlmeyer <robbe@orcus.priv.at>: esd changes
Hannu Napari's <Hannu.Napari@hut.fi>: SGI audio patches
<Juergen.Schoew@unix-ag.uni-siegen.de>: native AIX support
<psst@euskalnet.net>: playlist patch
Gilles Zunino <Gilles.Zunino@hei.fupl.asso.fr>: SGI audio patches
Matthew Parslow <roy@alpha.alphalink.com.au>: esdserver patch
<dlux@dlux.sch.bme.hu>: equalizer patch (equalfile setting)
Ducroquet Erwan <ducroque@ufr-info-p7.ibp.fr>: HPUX/ALib support
Shane Wegner <shane@CM.NU>: genrepatch
Samuel Audet <guardia@step.polymtl.ca>: wav-File patch
"J. Dean Brederson" <jdb@cs.utah.edu>: SGI-RAD support
Chou Ye-chi <is84002@cis.nctu.edu.tw>: sajberplay/FreeBSD patch
Fabrice Bellard <bellard@email.enst.fr>: 486 optimizations
A. Hermansen <ahermans@vf.telia.no> and J. Kysela <perex@jcu.cz>: ALSA output
KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp>: K6-3DNow
Petr Stehlik <stehlik@cas3.zlin.vutbr.cz>: MINT
Andy <andy@snoogie.demon.co.uk>: float2int speed up proposal
Brian Foutz <foutz@anise.ee.cornell.edu>: TK3Play
Thomas Niederreiter <tn@tarantel.rz.fh-muenchen.de>: RIFF header fix
Stefan Gybas <cab@studbox.uni-stuttgart.de>: m68k patch
Grant Erickson <eric0139@tc.umn.edu>: Linux PPC patch
Peter Berger <peterb@hoopoe.psc.edu>: BSDi patch
Henrik P Johnson <king@one.se>: HTTP auth
Steven Tiger Lang <tiger@tyger.org>: advanced shuffle
"Brian J. Swetland" <swetland@uiuc.edu>: front-end (remote) patch
<leo@zycad.com>
Tillmann Steinbrecher <tst@gmx.de>: shuffle patch
M.Stekelenburg <m.stekelenburg@student.utwente.nl>: i386-getbits
Antti Andreimann <anttix@cyberix.edu.ee>: outburst patch
Hur TaeSung <saturn@arari.snu.ac.kr>: 'http accept' patch
(from post-0.59 changes that yet have to go into new trunk:)
Hans Schwengeler <schweng@astro.unibas.ch>: audio_dec additions
Wojciech Barañski's Mp3Play (check the tools folder): Mp3Play frontend
Daniel Koukola: audio_oss.c patch
Munechika SUMIKAWA <sumikawa@ebina.hitachi.co.jp>: IPv6
TEMNOTA <temnota@kmv.ru>: HTTP,FTP patch/playlist fix
Peter Surda <shurdeek@panorama.sth.ac.at>: VBR patch
Ben <ben@blaukopf.com>: ARM startup time improvements
Dave MacKenzie <djm@pix.net>: init_output() patch
pasky's <pasky@ju.cz>: close-on-stop patch

View file

@ -0,0 +1,773 @@
This is the file that contains the terms of use, copying, etc. for the mpg123 distribution package.
Main message:
Code is copyrighted by Michael Hipp, who made it free software under the terms of the LGPL 2.1.
But that is not all of it.
mpg123 is licensed under the GNU General Lesser Public License, version 2.1, and in parts under the GNU General Public License, version 2.
That means that _all_ of mpg123 is licensed under GPL and the major part also under the LGPL.
Actually, the "major part" currently is the whole distributed package of mpg123. There are some files (old alsa output, libao output) that you get from our svn repository and that do not fall under LGPL.
When the copyright marker in a source file says "the mpg123 project" that means that the file contains code copyrighted by contributors to mpg123, the "initially written by" naming the person(s) that created the file and thus may have the largest part of copyrights on it.
I am explaining this here to emphasize that the copyright always actually lies by the individual member (i.e. contributor to) of the mpg123 project who wrote a specific section of code.
Usage of a source code management system like Subversion should provide keeping track of individual copyright traces...
Please consider that any code that is contributed to the mpg123 project shall be licensed under LGPL 2.1 .
If you want to contribute, but don't agree to that (i.e. you want to have your code GPL only) please say so - then, we either you convince is to include your code under GPL, we convince you to make it LGPL instead or, as a last resort, you'll have to do you own GPLed fork.
But we should try to avoid the last option...
All files in the distribution that don't carry a license note on their own are licensed under the terms of the LGPL 2.1; all files that do carry either a LGPL or GPL note are licensed respectively under the LGPL or GPL as follows:
=======================
1. The LGPL version 2.1
=======================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
====================
2. The GPL version 2
====================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View file

@ -0,0 +1,3 @@
This is a dummy file. If you want to see the change log, use subversion:
svn log -v svn://orgis.org/mpg123

View file

@ -0,0 +1,111 @@
mpg123 install hints
--------------------
(This file has very long lines - die-hard terminal nostalgists can be satisfied by `fmt -s -w 75 < INSTALL | less`. I think it's better to let the reader's preference rule than to preformat the stuff to some arbitrary width.)
0. Prerequesites
You really need:
- a C compiler; we try to keep the code ANSI C89/ISO C90 compatible
gcc from 2.95 on should work, others, too - please report any issues
Actually, we have a confirmed working build (svn trunk leading to release 0.67) on SunOS 4.1.4 with gcc-2.7.0 .
- an (UNIX-like) operating system with standard tools; MinGW32 and Cygwin are working for Microsoft Windows, too. We also have users happily on OS/2.
- For the library only, you may get lucky with MSVC++ using the project files under ports/
- For other exotic platforms, also see ports/
- If building from direct SCM checkout, you need GNU autotools installed (see below).
You want:
- working assembler (recent GNU binutils) if using certain CPU optimizations
- headers and lib for certain audio output drivers (libasound for alsa, sdl for sdl...)
- libtool's libltdl for runtime output modules (this used to be included, but now we rely on an existing install)
1. Build
There is one main supported way to get your mpg123 installation consisting of
a) the mpg123 binary file
- with libmpg123 as shared library or statically linked
- with audio output plugins, or one statically linked
b) a man page
(you may want to copy some of the documentation - README, etc - to /usr/share/doc/mpg123 or the like, too)
This way is the usual GNU 3-step procedure:
./configure
make
make install
Run
./configure --help
for a list of possible parameters you can specify in the configuration step. The obvious are --prefix and the normal GNU autotool bunch, but others include what audio subsystem to use and what CPU optimizations to build in.
For the optimizations (decoder choice), the default is a build that combines all usable optimizations for the platform and chooses one at runtime (see --cpu, --list-cpu and --test-cpu parameters).
There are various parameters you can tune, but of course the defaults are what is mainly tested.
Also, various library features can be left out via --disable options (like output formats, resampling modes). That way, you can strive for a minimal build that only does what you really need. Not every combination of library features is tested regularily, so you might hit some speed bumps, but usually stuff that is easily worked out (at least for the mpg123 team when you report it).
An example (working on mpg123 trunk r3062):
CFLAGS="-Os -s" ./configure --with-cpu=generic --disable-id3v2 --disable-lfs-alias --disable-feature-report --with-seektable=0 --disable-16bit --disable-32bit --disable-8bit --disable-messages --disable-feeder --disable-ntom --disable-downsample --disable-icy && make
That, and further application of `strip --strip-unneeded`, yields a lean 93 KiB shared library for MPEG layer I/II/III decoding to floating point on my x86-64 system (it should be a bit smaller on 32 bit systems). When disabling layers I and II, too, that goes down to 81 KiB.
The shared library of a full build weighs 170 KiB after stripping.
2. Developer build
This project uses GNU autotools (no specific version, but they should be fairly recent), also libtool. You need to have those installed, as it is usually the case for build environments based on the GNU toolchain.
One a fresh SCM checkout, or after changing things in configure.ac, you need to run
autoreconf -iv
to prepare the configure script. Then you can build as per point 1.
3. Library-only build
If you do not want to build the whole thing, but only the library, run
./configure
cd src/libmpg123
make
You can then find the library itself under src/libmpg123/.libs (libtool likes to hide things there).
4. Exotic platforms
See the ports/ directory for some help for building at least libmpg123 without the UNIX shell / autotools. The main strategy is to write a config.h to replace what configure would generate and then have a correct listing of all source files involved in that configuration (there are optional files for different decoder choices, for example).
Then compile objects, link.
4a. Preparing Win32 binary packages.
Caution: You should make sure to use some gcc >= 4.2.0, even if it's still the experimental package for MinGW32.
This helps preventing incompatibilities between generated DLL files and other compilers (it's about stack alignment).
Get MinGW/MSYS installed, run the MSYS shell.
Enter the mpg123 source directory.
Execute sh ./windows-builds.sh .
After some time, you should have some relevant files under releases/ (or releases\, for Windows people;-).
You don't just get one build -- there are several variants, corresponding to what usually is to be found under http://mpg123.org/download/win32 .
5. Note on large file support
The libmpg123 API includes the generic off_t type for file offsets and thus is subject to shape-shifting on systems that change off_t depending on build flags.
To deal with the incompatibilities that can cause, the library needs to separate code paths for small and large off_t.
Since version 1.12.0, a large-file-enabled libmpg123 (the default set by configure) provides a dual-mode ABI. Depending on _FILE_OFFSET_BITS, the mpg123.h header file selects different library symbols to use for your app.
In both large-file and normal mode, the library should just work for your app.

View file

@ -0,0 +1,99 @@
## Makefile.am: produce Makefile.in from this
## copyright by the mpg123 project - free software under the terms of the LGPL 2.1
## see COPYING and AUTHORS files in distribution or http://mpg123.org
## initially written by Nicholas J. Humfrey
dist_man_MANS = man1/mpg123.1
SUBDIRS = src doc
DIST_SUBDIRS = src doc
ACLOCAL_AMFLAGS = -I m4
# pkg-config file for the mpg123 library
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmpg123.pc
# mpg123.spec is autogenerated but needs to be present in tarball!
EXTRA_DIST = \
mpg123.spec \
makedll.sh \
windows-builds.sh \
equalize.dat \
NEWS.libmpg123 \
ports/MSVC++/mpg123.h \
ports/MSVC++/config.h \
ports/MSVC++/msvc.c \
ports/MSVC++/examples/scan.c \
ports/MSVC++/examples/feedseek.c \
ports/MSVC++/2005/libmpg123/libmpg123.vcproj \
ports/MSVC++/2008/mpg123.sln \
ports/MSVC++/2008/feedseek/feedseek.vcproj \
ports/MSVC++/2008/mpglib/mpglib.vcproj \
ports/MSVC++/2008/libmpg123/libmpg123.vcproj \
ports/MSVC++/2008/scan/scan.vcproj \
ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj \
ports/MSVC++/2008clr/2008clr.sln \
ports/MSVC++/2008clr/mpg123clr/advanced.cpp \
ports/MSVC++/2008clr/mpg123clr/advanced.h \
ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp \
ports/MSVC++/2008clr/mpg123clr/dllmain.cpp \
ports/MSVC++/2008clr/mpg123clr/enum.h \
ports/MSVC++/2008clr/mpg123clr/error.cpp \
ports/MSVC++/2008clr/mpg123clr/error.h \
ports/MSVC++/2008clr/mpg123clr/id3v1.cpp \
ports/MSVC++/2008clr/mpg123clr/id3v1.h \
ports/MSVC++/2008clr/mpg123clr/id3v2.cpp \
ports/MSVC++/2008clr/mpg123clr/id3v2.h \
ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp \
ports/MSVC++/2008clr/mpg123clr/mpg123clr.h \
ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc \
ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj \
ports/MSVC++/2008clr/mpg123clr/ReadMe.txt \
ports/MSVC++/2008clr/mpg123clr/resource.h \
ports/MSVC++/2008clr/mpg123clr/stdafx.cpp \
ports/MSVC++/2008clr/mpg123clr/stdafx.h \
ports/MSVC++/2008clr/mpg123clr/string.cpp \
ports/MSVC++/2008clr/mpg123clr/string.h \
ports/MSVC++/2008clr/mpg123clr/targetver.h \
ports/MSVC++/2008clr/mpg123clr/text.cpp \
ports/MSVC++/2008clr/mpg123clr/text.h \
ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj \
ports/MSVC++/2008clr/examples/feedseekclr/Program.cs \
ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs \
ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj \
ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs \
ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs \
ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj \
ports/MSVC++/2008clr/examples/scanclr/Program.cs \
ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs \
ports/MSVC++/2010/mpg123.sln \
ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj \
ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters \
ports/MSVC++/2010/feedseek/feedseek.vcxproj \
ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters \
ports/MSVC++/2010/libmpg123/libmpg123.vcxproj \
ports/MSVC++/2010/scan/scan.vcxproj \
ports/MSVC++/2010/scan/scan.vcxproj.filters \
ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj \
ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE \
ports/MSVC++/CMP3Stream/README \
ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP \
ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP \
ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP \
ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP \
ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H \
ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H \
ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H \
ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H \
ports/README \
ports/Sony_PSP/config.h \
ports/Sony_PSP/README \
ports/Sony_PSP/Makefile.psp \
ports/Sony_PSP/readers.c.patch \
ports/mpg123_.pas \
ports/Xcode/config.h \
ports/Xcode/mpg123.h \
ports/Xcode/mpg123.xcodeproj/project.pbxproj \
scripts/benchmark-cpu.pl \
scripts/tag_lyrics.py

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,133 @@
Changes in libmpg123 libtool interface versions...
36.0.36
- Extended MPG123_RESYNC_LIMIT to initial header search.
- Not cutting decoder delay unconditionally anymore (only in combination with known encoder delay / padding).
35.0.35
- Added mpg123_meta_free().
34.0.34
- Added flag MPG123_AUTO_RESAMPLE.
- Changed (improved;-) outbuffer behaviour.
33.0.33
- Added MPG123_BUFFERFILL.
32.0.32
- Added mpg123_framepos()
31.0.31
- Added mpg123_framedata() and MPG123_IGNORE_INFOFRAME.
30.0.30
- Added MPG123_FEEDPOOL and MPG123_FEEDBUFFER.
29.0.29
- New decoder: ARM neon.
- Added support for 24 bit output (dumb byte-chopping of 32 bit output).
28.0.28
- Add mpg123_strlen().
27.0.27
- Implictly disable seeking on streams when client enforced ICY parsing.
This helps debugging dumps of http streams.
26.0.26
- Added mpg123_encsize().
- Added flag MPG123_SKIP_ID3V2.
25.0.25
- Version increase to mark the point where the split between normal and large-file-enabled library vanishes again. The world did not like it.
Now Thomas lost some days of recreation and sleep to give it a dual-mode libmpg123 on large-file-sensitive systems.
24.0.24
- Introduce mpg123_replace_reader_handle() and mpg123_open_handle()
... this is also in preparation for the next version which will drop the separated large-file library again, due to public display of dismay.
- Add the experimental mpg123_framebyframe_decode to the off_t-sensitive functions.
23.0.23
- Version increase to mark the point where the explicit split between normal and large-file-enabled library has been introduced.
22.0.22
- Experimental framebyframe API added.
21.0.21
- Added support of unicode file names under windows via UTF-8 argument to mpg123_open.
- Added mpg123_feature(), for example to test for the above behaviour.
20.0.20
- New flag: MPG123_PLAIN_ID3TEXT
- Corresponding text encoding handling API added:
mpg123_enc_from_id3, mpg123_store_utf8
19.0.19
- Hm, what was it exactly now... there are candidates:
- runtime dithering
- free format
- ARM optimizations
18.0.18
- new parameter: MPG123_PREFRAMES is now tunable (the number of frames to decode and skip before a seek point), also default value increased
17.0.17
- introduction optimized stereo synths
16.0.16
- introducing floating point x86-64 SSE synth
15.0.15
- first addition of x86-64 SSE optimizations
14.0.14
- the first libmpg123 with actually working MPG123_UPSPEED
- also important regression fix concerning skipping of frames
13.0.13
- The whole set of output formats is generally available (8, 16 and 32 bit integer, signed/unsigned, float)
- Many features can be absent from libary as build decision (minimize binary size).
12.0.12
- added mpg123_current_decoder
- fixed value of MPG123_ENC_FLOAT
- float output now is a real runtime option
11.0.11
- added mpg123_getstate
- run-time tunable frame index
- officially configured with largefile support where available
10.0.10
- new flag MPG123_FUZZY (along with the fuzzy seek functionality)
9.0.9
- added mpg123_tell_stream
8.0.8
- added mpg123_get_eq
7.0.7
- added mpg123_set_filesize
6.0.6
- added mpg123_icy2utf8
5.0.5
- added mpg123_feed
- input buffers now const
4.0.4
- extended mpg123_string api (mpg123_add_substring, mpg123_grow_string)
3.0.3
- Initial floating point support as compile-time option.
2.0.2
- New flag MPG123_SEEKBUFFER.
1.0.1
- Added MPG123_RESYNC_LIMIT parameter.
- Added MPG123_OUT_OF_SYNC and MPG123_RESYNC_FAIL error codes.
- Fix for uninitialized framesize value in handle.

View file

@ -0,0 +1,203 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* mpg123 - MPEG 1.0/2.0/2.5 audio player *
* README for version 1.x.y, dated at 14.06.2009 *
* *
* ...still the fastest MPEG audio player for UNIX ;) *
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
(This file has very long lines - die-hard terminal nostalgists can be satisfied by `fmt -s -w 75 < README | less`. I think it's better to let the reader's preference rule than to preformat the stuff to some arbitrary width.)
0. Stuff
For building/installation info see INSTALL.
The mpg123 project was started by Michel Hipp and is now being maintained by Thomas Orgis and Nicholas J. Humfrey, who initiated the Sourceforge project.
The source code contains contributions from quite a few people - see AUTHORS for more info.
It is Open Source software licensed mostly under the LGPL with some parts restricted to GPL. See COPYING for details.
As for every mp3 player, some of mpg123's functionality may be covered by patents in a country where these are valid. See PATENTS for details.
Project's official website URL is
http://mpg123.org
(or http://mpg123.orgis.org as fallback address if there is a problem with the DNS forwarding)
for the traditional home page and
http://sourceforge.net/projects/mpg123
for sourceforge.net based services like download mirrors, mailing lists and bug/feature trackers.
Please use the sourceforge download mirrors when possible to minimize load on the mpg123.org server.
1. Introduction
This is a console based decoder/player for mono/stereo mpeg audio files, probably more familiar as MP3 or MP2 files.
It's focus is speed. We still need some low-end benchmarks for the current version, but playback should be possible even on i486 CPUs. There is hand-optimized assembly code for i586, MMX, 3DNow, SEE and 3DNowExt instructions, while generic code runs on a variety of different platforms and CPUs.
It can play MPEG1.0/2.0/2.5 layer I, II, II (1, 2, 3;-) files (VBR files are fine, too) and produce output on a number of different ways: raw data to stdout and different sound systems depending on your platform (see INSTALL).
Most tested are Linux on x86 and Alpha/AXP and MacOSX on ppc as the environments the current developers work in.
We are always thankful for user reports on success (and failure) on any platform!
2. Contact
short:
mpg123-devel@lists.sourceforge.net
mpg123-users@lists.sourceforge.net
or
maintainer@mpg123.org
long: see doc/CONTACT
3. Interface/Usage
Please consult the manpage mpg123(1). Some starter info follows.
3.1 Simple Console Usage
Mpg123 is a console program - normally it just plays a list of files you specify on command line and that's it. See the included manpage or
mpg123 --help
or, for the full story,
mpg123 --longhelp
on command line syntax/options. I encourage you to check out the --gapless and --rva-album/--rva-mix options:-)
In the simple "mpg123 file1.mp3 file2.mp3" mode, the only thing you can do to interact is to press Ctrl+C to skip to next track or end the whole playback if pressing it twice.
Note that this Ctrl+C behaviour is special to this mode; when any of the following is activated, Ctrl+C will just kill the program like you would expect normally (this changed from earlier versions).
3.2 Advanced Console Usage
You can specify the option -C to enable a terminal control interface enabling to influence playback on current title/playlist by pressing some key:
-= terminal control keys =-
[s] or [ ] interrupt/restart playback (i.e. 'pause')
[f] next track
[d] previous track
[b] back to beginning of track
[p] pause while looping current sound chunk
[.] forward
[,] rewind
[:] fast forward
[;] fast rewind
[>] fine forward
[<] fine rewind
[+] volume up
[-] volume down
[r] RVA switch
[v] verbose switch
[l] list current playlist, indicating current track there
[t] display tag info (again)
[m] print MPEG header info (again)
[h] this help
[q] quit
You can change these bindings to key to your liking by modifying term.h .
Note: This interface needs not to be available on _every_ platform/build.
Another note: The volume up and down is performed by changing the scale factor (like the -f parameter) ... so the audio is scaled digitally in the given range of the output format (usually 16bits). That means the lowering the volume will decrease the dynamic range and possibly lessen the quality while increasing volume can in fact increase the dynamic range and thus make it better, if you deal with a silent source and no clipping is necessary.
It is a good idea to use RVA values stored in the file for adjusting low volume files, though - mpg123 handles that in addition to your volume setting.
3.3 Control Interface for Frontends
There used to be several interfaces for frontends left over from that past, but only one of them remains for the present and future:
The Generic Control Interface
It contains of communication of textual messages via standard input to mpg123 and responses to standard output unless the -s switch for output of audio data on stdout is used - then the responses come via stderr.
See doc/README.remote for usage.
4. Speed
mpg123 is fast. Any faster software player is probably based on some hacked mpg123;-)
MPlayer included mpg123 source code in it's mp3lib and we have to be thankful for the MPlayer folks adding SSE, 3DNowExt and AltiVec optimizations over the years, which we were able to backport.
mpg123 includes the AltiVec optimization since version 0.61 and the SSE and 3DNowExt optimizations since 0.66 .
Also, version 0.66 adds the merged x86 optimization build, which includes every applicable optimization for x86 cpus except the one for i486, wich is a bit special.
Now mpg123 catched up with MPlayer's mp3lib concerning decoding speed on my Pentium M (which supports SSE):
Decoding a certain album (Queensryche's Rage for Order) to /dev/null took 22.4s user time with mpg123-0.66 compared to 24.7s with MPlayer-1.0rc1 .
Also, beginning with mpg123 1.8.0, there are fresh x86-64 SSE optimizations (provided by Taihei Monma) which make mpg123 the fastest MPEG audio decoder in my knowledge also on current 64bit x86 systems.
5. Accuracy
The mpg123 engine is able to decode in full compliance to ISO/IEC 11172-3, for all three layers, using floating point or integer math (the latter since 1.8.1).
Accuracy of 16bit output depends on specific optimization in use and compile-time choice about the rounding mode (which is performance relevant).
The ISO test suite is incorporated in the mpg123 subversion repository under svn://orgis.org/mpg123/test, nightly tests of a build (with high-quality 16bit rounding) are published on the mpg123 website.
Dithered 16bit output is available as an option (the --cpu choices ending with _dither). See
http://dither123.dyndns.org
on the whereabouts.
6. History
A looooong time ago (mid-90s), Michael Hipp wrote some initial mpg123 and made it _the_ Unix console mp3 player in the following years.
The exact date of birth is fuzzy in human memory, but according to the master himself (Michael) mpg123 started in 1994 as an MP2 player which a year later, 1995, gained MP3 ability.
The core decoder files have mostly 1995 as their birth year listed, so one can say that mpg123 as the layer1,2,3 player was born in 1995.
In any case, that is a looooong time ago for a media player - especially for one that is still alive!
This is the historic description:
This isn't a new player. It's a fully rewritten version originally based
on the mpegaudio (FHG-version) package. The DCT algorithm in the
synthesis filter is a rewritten version of the DCT first seen in the maplay
package, which was written by Tobias Bading (bading@cs.tu-berlin.de). The
rewrite was necessary, because the GPL may not allow this copyright mix.
The mpegaudio package was written by various people from the MPEG/audio
software simulation group. The maplay is under GPL .. You can find the
original source code and the mpegaudio package on: ftp.tnt.uni-hannover.de.
Especially layer3.c common.c and mpg123.h is based on the dist10 package.
The code is fully rewritten but I'm using sometimes the
same variable names or similar function names as in the
original package.
In the current layer3.c I'm using a DCT36 first seen in Jeff Tsay's
(ctsay@pasteur.eecs.berkeley.edu) maplay 1.2+ package. His code is
under GPL .. I also tried the enhancement from Mikko Tommila. His
code is also in layer3.c (but it's disabled at the moment, because
it was slightly slower than the unrolled 9 point DCT (at least on
_my_ system)). Theoretically it should be faster. You may try it on
your system.
Well, that's how it started...
Official development ceased due to the typical lack-of-time syndrome around 2002 and the free-floating patches began to seize the day.
But before that, Michael wrote or rewrote the essential code; others contributed their bits.
The main message is:
Code is copyrighted by Michael Hipp, who made it free software under the terms of the LGPL 2.1.
Please see doc/ROAD_TO_LGPL, COPYING and AUTHORS for details on that. Note that the only notable legacy non-LGPL file was the old alsa output that didn't work with alsa 0.9/1.0 anymore.
Also, there has been a libao output in the betas 0.60 for a short period. Libao being generally problematic for us because of its GPL license, this output is not distributed anymore in the release packages. There is now a new, LGPLed alsa output that made both the old alsa and libao obsolete for our purposes.
So, the distributed mpg123 releases actually only contain LGPL code, but you get the other files from our subversion repository if you checkout the trunk / version tags.
There has been quite some confusion about the licensing and "freeness" of mpg123 in the past.
The initial "free for private use, ask me when you want to do something commercial" license caused some people to avoid mpg123 and even to write a replacement mimicking the interface but using a different decoding engine - what was not actively developed for too long but entered the "free" software sections.
The Debian (non-free section) and Gentoo distributions cared about the last stable and the last development release of mpg123 over the years with mainly applying security fixes. Thanks go to the distribution maintainers for not letting it alone to bitrot over the years.
Thomas Orgis started to hack on mpg123 in 2004 while working on his personal audio experience with mixplayd and later DerMixD, utilizing the generic control interface. In Feb 2005, he crammed control interface improvements together with Debian's r19 fixes and released the personal fork/patch named mpg123-thor.
Little later that year, Nicholas J. Humphrey independently created the sourceforge project and released an autotooled 0.59r under official GPL flag with Debian and MacOSX fixes.
In the beginning of 2006, Thomas finally decided that he could work "officially" on mpg123 and contacted Michael Hipp for taking over maintainership.
Michael was all-positive about letting mpg123 really live again (and perhaps see version 1.0 some time;-) and also pointed at the sourceforge project that didn't see much activity since the initial release.
A lot of emails and some weeks later there was the two-developer team of Nicholas and Thomas working on merging their mpg123 variants as well as adding some features and fixes to let it shine again.
And there we are now...
7. End
Have fun!
____________
Thomas Orgis

View file

@ -0,0 +1,38 @@
Things that need to be done...
... as always, mostly outdated.
0. Fix that ugly crash that happens sometimes when Ctrl+C-ing with jack output active:
Program terminated with signal 11, Segmentation fault.
[New process 6293]
[New process 6291]
[New process 6292]
[New process 6284]
#0 0x00002aced607695b in memcpy () from /lib/libc.so.6
(gdb) bt
#0 0x00002aced607695b in memcpy () from /lib/libc.so.6
#1 0x00002aced5b4f092 in jack_ringbuffer_read () from /usr/lib/libjack.so.0
#2 0x00000000004151dd in process_callback ()
#3 0x00002aced5b4bf40 in Jack::JackClient::Execute () from /usr/lib/libjack.so.0
#4 0x00002aced5b5f8da in Jack::JackPosixThread::ThreadHandler () from /usr/lib/libjack.so.0
#5 0x00002aced6354fa7 in start_thread () from /lib/libpthread.so.0
#6 0x00002aced60c802d in clone () from /lib/libc.so.6
1. mpg123 could pick up new sample rates suggested by the output modules (like a jack server fixed to 96kHz) and adapt to that.
Though the practical rates for MPEG audio are up to 48kHz ... but one could easily upsample.
Currently, we detect standard rates and resample when needed... but not new ones.
4. Prevent ID3v2 tags from being parsed multiple times after seek.
I need to carry a list of ID3v2 frame addresses that already have been parsed into the data structures.
Currently, this is a possible memory leak when the seek index is disabled (tag data at file beginning) or id3 data is just somewhere in the stream.
That being said, in the "normal" case, there is no leak.
5. What's about SINGLE_MIX?
Check what is _really_ happening there, make some test file...
6. Ensure proper operation of free format with the feeder.
MPG123_NEED_MORE needs to be propagated from the freeformat framesize guesser.

1168
libs/speaker/deps/mpg123/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,460 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
/* #undef ABI_ALIGN_FUN */
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .balign is present. */
#define ASMALIGN_BALIGN 1
/* Define if .align just takes byte count. */
/* #undef ASMALIGN_BYTE */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
/* #undef ASMALIGN_EXP */
/* Define if __attribute__((aligned(16))) shall be used */
#define CCALIGN 1
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "oss"
/* Define if building with dynamcally linked libmpg123 */
#define DYNAMIC_BUILD 1
/* Use EFBIG as substitude for EOVERFLOW, mingw.org may lack the latter */
/* #undef EOVERFLOW */
/* Define if FIFO support is enabled. */
#define FIFO 1
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#define HAVE_GAI_ADDRCONFIG 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
/* #undef HAVE_LINUX_SOUNDCARD_H */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
/* #undef HAVE_OPENAL_ALC_H */
/* Define to 1 if you have the <OpenAL/al.h> header file. */
/* #undef HAVE_OPENAL_AL_H */
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of native offset type in bits, used for LFS alias
functions. */
#define LFS_ALIAS_BITS 64
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
#define NETWORK 1
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
/* #undef NO_32BIT */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* #undef NO_REAL */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define for post-processed 32 bit formats. */
/* #undef NO_SYNTH32 */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.22.2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.22.2"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 8
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Define for new Huffman decoding scheme. */
#define USE_NEW_HUFFTABLE 1
/* Define to use yasm for assemble AVX sources. */
/* #undef USE_YASM_FOR_AVX */
/* Version number of package */
#define VERSION "1.22.2"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long long' if <sys/types.h> does not define. */
/* #undef int64_t */
/* Define to the native offset type (long or actually off_t). */
#define lfs_alias_t off_t
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,437 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
/* #undef ABI_ALIGN_FUN */
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
#define ASMALIGN_EXP 1
/* Define if __attribute__((aligned(16))) shall be used */
/* #undef CCALIGN */
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "oss"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
#define FIFO 1
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#define HAVE_GAI_ADDRCONFIG 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#define HAVE_LINUX_SOUNDCARD_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
/* #undef HAVE_OPENAL_ALC_H */
/* Define to 1 if you have the <OpenAL/al.h> header file. */
/* #undef HAVE_OPENAL_AL_H */
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
/* #undef IEEE_FLOAT */
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 32
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
/* #undef NETWORK */
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
#define NO_32BIT 1
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
#define NO_REAL 1
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,437 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
/* #undef ABI_ALIGN_FUN */
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
#define ASMALIGN_EXP 1
/* Define if __attribute__((aligned(16))) shall be used */
/* #undef CCALIGN */
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "oss"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
#define FIFO 1
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#define HAVE_GAI_ADDRCONFIG 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#define HAVE_LINUX_SOUNDCARD_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
/* #undef HAVE_OPENAL_ALC_H */
/* Define to 1 if you have the <OpenAL/al.h> header file. */
/* #undef HAVE_OPENAL_AL_H */
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
/* #undef IEEE_FLOAT */
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 32
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
/* #undef NETWORK */
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
#define NO_32BIT 1
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
#define NO_REAL 1
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,429 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
#define ABI_ALIGN_FUN 1
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
/* #undef ASMALIGN_EXP */
/* Define if __attribute__((aligned(16))) shall be used */
#define CCALIGN 1
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "oss"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
#define FIFO 1
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#define HAVE_LINUX_SOUNDCARD_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
/* #undef HAVE_OPENAL_ALC_H */
/* Define to 1 if you have the <OpenAL/al.h> header file. */
/* #undef HAVE_OPENAL_AL_H */
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 32
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
#define NETWORK 1
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
/* #undef NO_32BIT */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* #undef NO_REAL */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,429 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
/* #undef ABI_ALIGN_FUN */
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
/* #undef ASMALIGN_EXP */
/* Define if __attribute__((aligned(16))) shall be used */
#define CCALIGN 1
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "oss"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
/* #undef FIFO */
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#define HAVE_LINUX_SOUNDCARD_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
/* #undef HAVE_OPENAL_ALC_H */
/* Define to 1 if you have the <OpenAL/al.h> header file. */
/* #undef HAVE_OPENAL_AL_H */
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 64
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
#define NETWORK 1
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
/* #undef NO_32BIT */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* #undef NO_REAL */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 8
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,437 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
#define ABI_ALIGN_FUN 1
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
#define ASMALIGN_EXP 1
/* Define if __attribute__((aligned(16))) shall be used */
#define CCALIGN 1
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "coreaudio"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
/* #undef FIFO */
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
#define HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H 1
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
#define HAVE_AUDIOUNIT_AUDIOUNIT_H 1
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
#define HAVE_CORESERVICES_CORESERVICES_H 1
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#define HAVE_GAI_ADDRCONFIG 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
#define HAVE_LIBMX 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
/* #undef HAVE_LINUX_SOUNDCARD_H */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
#define HAVE_OPENAL_ALC_H 1
/* Define to 1 if you have the <OpenAL/al.h> header file. */
#define HAVE_OPENAL_AL_H 1
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
/* #undef HAVE_SCHED_SETSCHEDULER */
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
/* #undef HAVE_SYS_SOUNDCARD_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 64
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
#define NETWORK 1
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
/* #undef NO_32BIT */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* #undef NO_REAL */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 8
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,437 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
/* #undef ABI_ALIGN_FUN */
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
#define ASMALIGN_EXP 1
/* Define if __attribute__((aligned(16))) shall be used */
#define CCALIGN 1
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "coreaudio"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
/* #undef FIFO */
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
#define HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H 1
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
#define HAVE_AUDIOUNIT_AUDIOUNIT_H 1
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
#define HAVE_CORESERVICES_CORESERVICES_H 1
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#define HAVE_GAI_ADDRCONFIG 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
#define HAVE_LIBMX 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
/* #undef HAVE_LINUX_SOUNDCARD_H */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
#define HAVE_OPENAL_ALC_H 1
/* Define to 1 if you have the <OpenAL/al.h> header file. */
#define HAVE_OPENAL_AL_H 1
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
/* #undef HAVE_SCHED_SETSCHEDULER */
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
/* #undef HAVE_SYS_SOUNDCARD_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 64
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
#define NETWORK 1
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
/* #undef NO_32BIT */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* #undef NO_REAL */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 8
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,437 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
#define ABI_ALIGN_FUN 1
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
/* #undef ASMALIGN_EXP */
/* Define if __attribute__((aligned(16))) shall be used */
/* #undef CCALIGN */
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "oss"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
#define FIFO 1
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#define HAVE_GAI_ADDRCONFIG 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
/* #undef HAVE_LINUX_SOUNDCARD_H */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
/* #undef HAVE_OPENAL_ALC_H */
/* Define to 1 if you have the <OpenAL/al.h> header file. */
/* #undef HAVE_OPENAL_AL_H */
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
#define HAVE_SYS_AUDIOIO_H 1
/* Define to 1 if you have the <sys/audio.h> header file. */
#define HAVE_SYS_AUDIO_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 32
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
/* #undef NETWORK */
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
/* #undef NO_32BIT */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* #undef NO_REAL */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,437 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
/* #undef ABI_ALIGN_FUN */
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
/* #undef ASMALIGN_EXP */
/* Define if __attribute__((aligned(16))) shall be used */
#define CCALIGN 1
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "oss"
/* Define if building with dynamcally linked libmpg123 */
/* #undef DYNAMIC_BUILD */
/* Define if FIFO support is enabled. */
#define FIFO 1
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <alc.h> header file. */
/* #undef HAVE_ALC_H */
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <AL/alc.h> header file. */
/* #undef HAVE_AL_ALC_H */
/* Define to 1 if you have the <AL/al.h> header file. */
/* #undef HAVE_AL_AL_H */
/* Define to 1 if you have the <al.h> header file. */
/* #undef HAVE_AL_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#define HAVE_GAI_ADDRCONFIG 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
/* #undef HAVE_LINUX_SOUNDCARD_H */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
/* #undef HAVE_LTDL */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
/* #undef HAVE_OPENAL_ALC_H */
/* Define to 1 if you have the <OpenAL/al.h> header file. */
/* #undef HAVE_OPENAL_AL_H */
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
#define HAVE_SYS_AUDIOIO_H 1
/* Define to 1 if you have the <sys/audio.h> header file. */
#define HAVE_SYS_AUDIO_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#define LFS_ALIAS_BITS 64
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* The suffix for module files. */
#define MODULE_FILE_SUFFIX ".la"
/* Define if network support is enabled. */
/* #undef NETWORK */
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit and 24 bit integer output. */
/* #undef NO_32BIT */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* #undef NO_REAL */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.14.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.14.4"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 8
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
/* #undef USE_MODULES */
/* Version number of package */
#define VERSION "1.14.4"
/* Define to use Win32 named pipes */
/* #undef WANT_WIN32_FIFO */
/* Define to use Win32 sockets */
/* #undef WANT_WIN32_SOCKETS */
/* Define to use Unicode for Windows */
/* #undef WANT_WIN32_UNICODE */
/* WinXP and above for ipv6 */
/* #undef WINVER */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* WinXP and above for ipv6 */
/* #undef _WIN32_WINNT */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef uintptr_t */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,36 @@
#define strcasecmp _strcmpi
#define strncasecmp _strnicmp
#define strdup _strdup
#define HAVE_STRERROR 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STRDUP
#define HAVE_STDLIB_H
#define HAVE_STRING_H
/* We want some frame index, eh? */
#define FRAME_INDEX 1
#define INDEX_SIZE 1000
/* also gapless playback! */
#define GAPLESS 1
/* #ifdef GAPLESS
#undef GAPLESS
#endif */
/* #define DEBUG
#define EXTRA_DEBUG */
/* defined in "gyp"
#define REAL_IS_FLOAT */
#define inline __inline
/* we are on win32 */
#define HAVE_WINDOWS_H
/* use the unicode support within libmpg123 */
#ifdef UNICODE
#define WANT_WIN32_UNICODE
#endif

View file

@ -0,0 +1,46 @@
/*
mpg123_msvc: MPEG Audio Decoder library wrapper header for MS VC++ 2005
copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1
initially written by Patrick Dehne and Thomas Orgis.
*/
#ifndef MPG123_MSVC_H
#define MPG123_MSVC_H
#include <tchar.h>
#include <stdlib.h>
#include <sys/types.h>
typedef intptr_t ssize_t;
// Needed for Visual Studio versions before VS 2010.
#if (_MSC_VER < 1600)
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
#else
#include <stdint.h>
#endif
#define PRIiMAX "I64i"
typedef __int64 intmax_t;
// ftell returns long, _ftelli64 returns __int64
// off_t is long, not __int64, use ftell
#define ftello ftell
#define MPG123_NO_CONFIGURE
#include "mpg123.h.in" /* Yes, .h.in; we include the configure template! */
#ifdef __cplusplus
extern "C" {
#endif
// Wrapper around mpg123_open that supports path names with unicode
// characters
EXPORT int mpg123_topen(mpg123_handle *fr, const _TCHAR *path);
EXPORT int mpg123_tclose(mpg123_handle *fr);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,36 @@
#define strcasecmp _strcmpi
#define strncasecmp _strnicmp
#define strdup _strdup
#define HAVE_STRERROR 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STRDUP
#define HAVE_STDLIB_H
#define HAVE_STRING_H
/* We want some frame index, eh? */
#define FRAME_INDEX 1
#define INDEX_SIZE 1000
/* also gapless playback! */
#define GAPLESS 1
/* #ifdef GAPLESS
#undef GAPLESS
#endif */
/* #define DEBUG
#define EXTRA_DEBUG */
/* defined in "gyp"
#define REAL_IS_FLOAT */
#define inline __inline
/* we are on win32 */
#define HAVE_WINDOWS_H
/* use the unicode support within libmpg123 */
#ifdef UNICODE
#define WANT_WIN32_UNICODE
#endif

View file

@ -0,0 +1,46 @@
/*
mpg123_msvc: MPEG Audio Decoder library wrapper header for MS VC++ 2005
copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1
initially written by Patrick Dehne and Thomas Orgis.
*/
#ifndef MPG123_MSVC_H
#define MPG123_MSVC_H
#include <tchar.h>
#include <stdlib.h>
#include <sys/types.h>
typedef intptr_t ssize_t;
// Needed for Visual Studio versions before VS 2010.
#if (_MSC_VER < 1600)
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
#else
#include <stdint.h>
#endif
#define PRIiMAX "I64i"
typedef __int64 intmax_t;
// ftell returns long, _ftelli64 returns __int64
// off_t is long, not __int64, use ftell
#define ftello ftell
#define MPG123_NO_CONFIGURE
#include "mpg123.h.in" /* Yes, .h.in; we include the configure template! */
#ifdef __cplusplus
extern "C" {
#endif
// Wrapper around mpg123_open that supports path names with unicode
// characters
EXPORT int mpg123_topen(mpg123_handle *fr, const _TCHAR *path);
EXPORT int mpg123_tclose(mpg123_handle *fr);
#ifdef __cplusplus
}
#endif
#endif

20267
libs/speaker/deps/mpg123/configure vendored Executable file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,37 @@
# in every line, there are two values. One for the left
# and one for the right cahnnel.
# the first line is the multiplicator for the lowest frequency band
# the 32th line for the highest freq. band
#
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0

View file

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libmpg123
Description: An optimised MPEG Audio decoder
Requires:
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lmpg123
Cflags: -I${includedir}

View file

@ -0,0 +1,34 @@
dnl Check whether the AI_ADDRCONFIG flag can be used with getaddrinfo
dnl Taken from APR ...
AC_DEFUN([APR_CHECK_GETADDRINFO_ADDRCONFIG], [
AC_CACHE_CHECK(for working AI_ADDRCONFIG, apr_cv_gai_addrconfig, [
AC_TRY_RUN([
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
int main(int argc, char **argv) {
struct addrinfo hints, *ai;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_ADDRCONFIG;
return getaddrinfo("localhost", NULL, &hints, &ai) != 0;
}], [apr_cv_gai_addrconfig=yes],
[apr_cv_gai_addrconfig=no],
[apr_cv_gai_addrconfig=no])])
if test $apr_cv_gai_addrconfig = yes; then
AC_DEFINE(HAVE_GAI_ADDRCONFIG, 1, [Define if getaddrinfo accepts the AI_ADDRCONFIG flag])
fi
])

7982
libs/speaker/deps/mpg123/m4/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load diff

384
libs/speaker/deps/mpg123/m4/ltoptions.m4 vendored Normal file
View file

@ -0,0 +1,384 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 7 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [1], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for lt_pkg in $withval; do
IFS="$lt_save_ifs"
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

123
libs/speaker/deps/mpg123/m4/ltsugar.m4 vendored Normal file
View file

@ -0,0 +1,123 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

View file

@ -0,0 +1,23 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# @configure_input@
# serial 3337 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.4.2])
m4_define([LT_PACKAGE_REVISION], [1.3337])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.2'
macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

View file

@ -0,0 +1,98 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 5 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])

View file

@ -0,0 +1,19 @@
#!/bin/sh
if test -e Makefile; then
make clean
fi
options="$@"
echo "using options: $options"
CFLAGS="-march=i686" ./configure --disable-modules --with-cpu=x86_dither $options &&
cd src/libmpg123 &&
make &&
cp .libs/libmpg123-0.dll ../../ &&
cp .libs/libmpg123-0.dll.def ../../libmpg123-0.def
cd ../../ &&
echo "Now run that lib tool... perhaps you want to strip, too.
Hints:
strip --strip-unneeded libmpg123-0.dll
lib /machine:i386 /def:libmpg123-0.def" ||
echo You got some trouble.

View file

@ -0,0 +1,512 @@
.TH mpg123 1 "31 Jan 2008"
.SH NAME
mpg123 \- play audio MPEG 1.0/2.0/2.5 stream (layers 1, 2 and 3)
.SH SYNOPSIS
.B mpg123
[
.B options
]
.IR file " ... | " URL " ... | "
.B \-
.SH DESCRIPTION
.B mpg123
reads one or more
.IR file\^ s
(or standard input if ``\-'' is specified) or
.IR URL\^ s
and plays them on the audio device (default) or
outputs them to stdout.
.IR file\^ / URL
is assumed to be an MPEG audio bit stream.
.SH OPERANDS
The following operands are supported:
.TP 8
.IR file (s)
The path name(s) of one or more input files. They must be
valid MPEG-1.0/2.0/2.5 audio layer 1, 2 or 3 bit streams.
If a dash ``\-'' is specified, MPEG data will
be read from the standard input. Furthermore, any name
starting with ``http://'' is recognized as
.I URL
(see next section).
.SH OPTIONS
.B mpg123
options may be either the traditional POSIX one letter options,
or the GNU style long options. POSIX style options start with a
single ``\-'', while GNU long options start with ``\-\^\-''.
Option arguments (if needed) follow separated by whitespace (not ``='').
Note that some options can be absent from your installation when disabled in the build process.
.SH INPUT OPTIONS
.TP
\fB\-k \fInum\fR, \fB\-\^\-skip \fInum
Skip first
.I num
frames. By default the decoding starts at the first frame.
.TP
\fB\-n \fInum\fR, \fB\-\^\-frames \fInum
Decode only
.I num
frames. By default the complete stream is decoded.
.TP
.BR \-\-fuzzy
Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC).
Without that, seeks need a first scan through the file before they can jump at positions.
You can decide here: sample-accurate operation with gapless features or faster (fuzzy) seeking.
.TP
.BR \-y ", " \-\^\-no\-resync
Do NOT try to resync and continue decoding if an error occurs in
the input file. Normally,
.B mpg123
tries to keep the playback alive at all costs, including skipping invalid material and searching new header when something goes wrong.
With this switch you can make it bail out on data errors
(and perhaps spare your ears a bad time). Note that this switch has been renamed from \-\-resync.
The old name still works, but is not advertised or recommened to use (subject to removal in future).
.TP
\fB\-\^-resync\-limit \fIbytes\fR
Set number of bytes to search for valid MPEG data once lost in stream; <0 means search whole stream.
If you know there are huge chunks of invalid data in your files... here is your hammer.
Note: Only since version 1.14 this also increases the amount of junk skipped on beginning.
.TP
\fB\-p \fIURL \fR| \fBnone\fR, \fB\-\^\-proxy \fIURL \fR| \fBnone
The specified
.I proxy
will be used for HTTP requests. It
should be specified as full URL (``http://host.domain:port/''),
but the ``http://'' prefix, the port number and the trailing
slash are optional (the default port is 80). Specifying
.B none
means not to use any proxy, and to retrieve files directly
from the respective servers. See also the
``HTTP SUPPORT'' section.
.TP
\fB\-u \fIauth\fR, \fB\-\^\-auth \fIauth
HTTP authentication to use when recieving files via HTTP.
The format used is user:password.
.TP
\fB\-@ \fIfile\fR, \fB\-\^\-list \fIfile
Read filenames and/or URLs of MPEG audio streams from the specified
.I file
in addition to the ones specified on the command line (if any).
Note that
.I file
can be either an ordinary file, a dash ``\-'' to indicate that
a list of filenames/URLs is to be read from the standard input,
or an URL pointing to a an appropriate list file. Note: only
one
.B \-@
option can be used (if more than one is specified, only the
last one will be recognized).
.TP
\fB\-l \fIn\fR, \fB\-\^\-listentry \fIn
Of the playlist, play specified entry only.
.I n
is the number of entry starting at 1. A value of 0 is the default and means playling the whole list, a negative value means showing of the list of titles with their numbers...
.TP
\fB\-\-loop \fItimes\fR
for looping track(s) a certain number of times, < 0 means infinite loop (not with \-\-random!).
.TP
.BR \-\-keep\-open
For remote control mode: Keep loaded file open after reaching end.
.TP
\fB\-\-timeout \fIseconds\fR
Timeout in (integer) seconds before declaring a stream dead (if <= 0, wait forever).
.TP
.BR \-z ", " \-\^\-shuffle
Shuffle play. Randomly shuffles the order of files specified on the command
line, or in the list file.
.TP
.BR \-Z ", " \-\-random
Continuous random play. Keeps picking a random file from the command line
or the play list. Unlike shuffle play above, random play never ends, and
plays individual songs more than once.
.TP
\fB\-\^\-no\-icy\-meta
Do not accept ICY meta data.
.TP
\fB\-i, \-\^-\index
Index / scan through the track before playback.
This fills the index table for seeking (if enabled in libmpg123) and may make the operating system cache the file contents for smoother operating on playback.
.TP
\fB\-\-index\-size \fIsize\fR
Set the number of entries in the seek frame index table.
.TP
\fB\-\-preframes \fInum\fR
Set the number of frames to be read as lead-in before a seeked-to position.
This serves to fill the layer 3 bit reservoir, which is needed to faithfully reproduce a certain sample at a certain position.
Note that for layer 3, a minimum of 1 is enforced (because of frame overlap), and for layer 1 and 2, this is limited to 2 (no bit reservoir in that case, but engine spin-up anyway).
.SH OUTPUT and PROCESSING OPTIONS
.TP
\fB\-o \fImodule\fR, \-\^\-output \fImodule\fR
Select audio output module. You can provide a comma-separated list to use the first one that works.
.TP
\fB\-\^\-list\-modules
List the available modules.
.TP
\fB\-a \fIdev\fR, \fB\-\^\-audiodevice \fIdev
Specify the audio device to use. The default is
system-dependent (usually /dev/audio or /dev/dsp).
Use this option if you have multiple audio devices and
the default is not what you want.
.TP
.BR \-s ", " \-\^\-stdout
The decoded audio samples are written to standard output,
instead of playing them through the audio device. This
option must be used if your audio hardware is not supported
by
.BR mpg123 .
The output format per default is raw (headerless) linear PCM audio data,
16 bit, stereo, host byte order (you can force mono or 8bit).
.TP
\fB\-O \fIfile\fR, \fB\-\^\-outfile
Write raw output into a file (instead of simply redirecting standard output to a file with the shell).
.TP
\fB\-w \fIfile\fR, \fB\-\^\-wav
Write output as WAV file. This will cause the MPEG stream to be decoded
and saved as file
.I file
, or standard output if
.I -
is used as file name. You can also use
.I --au
and
.I --cdr
for AU and CDR format, respectively.
.TP
\fB\-\^\-au \fIfile
Does not play the MPEG file but writes it to
.I file
in SUN audio format. If \- is used as the filename, the AU file is
written to stdout.
.TP
\fB\-\^\-cdr \fIfile
Does not play the MPEG file but writes it to
.I file
as a CDR file. If \- is used as the filename, the CDR file is written
to stdout.
.TP
.BR \-\-reopen
Forces reopen of the audiodevice after ever song
.TP
.BR \-\-cpu\ \fIdecoder\-type
Selects a certain decoder (optimized for specific CPU), for example i586 or MMX.
The list of available decoders can vary; depending on the build and what your CPU supports.
This options is only availabe when the build actually includes several optimized decoders.
.TP
.BR \-\-test\-cpu
Tests your CPU and prints a list of possible choices for \-\-cpu.
.TP
.BR \-\-list\-cpu
Lists all available decoder choices, regardless of support by your CPU.
.TP
\fB\-g \fIgain\fR, \fB\-\^\-gain \fIgain
[DEPRECATED] Set audio hardware output gain (default: don't change). The unit of the gain value is hardware and output module dependent.
(This parameter is only provided for backwards compatibility and may be removed in the future without prior notice. Use the audio player for playing and a mixer app for mixing, UNIX style!)
.TP
\fB\-f \fIfactor\fR, \fB\-\^\-scale \fIfactor
Change scale factor (default: 32768).
.TP
.BR \-\-rva-mix,\ \-\-rva-radio
Enable RVA (relative volume adjustment) using the values stored for ReplayGain radio mode / mix mode with all tracks roughly equal loudness.
The first valid information found in ID3V2 Tags (Comment named RVA or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used.
.TP
.BR \-\-rva-album,\ \-\-rva-audiophile
Enable RVA (relative volume adjustment) using the values stored for ReplayGain audiophile mode / album mode with usually the effect of adjusting album loudness but keeping relative loudness inside album.
The first valid information found in ID3V2 Tags (Comment named RVA_ALBUM or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used.
.TP
.BR \-0 ", " \-\^\-single0 "; " \-1 ", " \-\^\-single1
Decode only channel 0 (left) or channel 1 (right),
respectively. These options are available for
stereo MPEG streams only.
.TP
.BR \-m ", " \-\^\-mono ", " \-\^\-mix ", " \-\^\-singlemix
Mix both channels / decode mono. It takes less
CPU time than full stereo decoding.
.TP
.BR \-\-stereo
Force stereo output
.TP
\fB\-r \fIrate\fR, \fB\-\^\-rate \fIrate
Set sample rate (default: automatic). You may want to
change this if you need a constant bitrate independent of
the mpeg stream rate. mpg123 automagically converts the
rate. You should then combine this with \-\-stereo or \-\-mono.
.TP
.BR \-2 ", " \-\^\-2to1 "; " \-4 ", " \-\^\-4to1
Performs a downsampling of ratio 2:1 (22 kHz) or 4:1 (11 kHz)
on the output stream, respectively. Saves some CPU cycles, but
at least the 4:1 ratio sounds ugly.
.TP
.BR \-\-pitch\ \fIvalue
Set hardware pitch (speedup/down, 0 is neutral; 0.05 is 5%). This changes the output sampling rate, so it only works in the range your audio system/hardware supports.
.TP
.BR \-\-8bit
Forces 8bit output
.TP
\fB\-\^\-float
Forces f32 encoding
.TP
\fp\-e \fIenc\fR, \fB\-\^\-encoding \fIenc
Choose output sample encoding. Possible values look like f32 (32-bit floating point), s32 (32-bit signed integer), u32 (32-bit unsigned integer) and the variants with different numbers of bits (s24, u24, s16, u16, s8, u8) and also special variants like ulaw and alaw 8-bit.
See the output of mpg123's longhelp for actually available encodings.
.TP
\fB\-d \fIn\fR, \fB\-\^\-doublespeed \fIn
Only play every
.IR n 'th
frame. This will cause the MPEG stream
to be played
.I n
times faster, which can be used for special
effects. Can also be combined with the
.B \-\^\-halfspeed
option to play 3 out of 4 frames etc. Don't expect great
sound quality when using this option.
.TP
\fB\-h \fIn\fR, \fB\-\^\-halfspeed \fIn
Play each frame
.I n
times. This will cause the MPEG stream
to be played at
.IR 1 / n 'th
speed (n times slower), which can be
used for special effects. Can also be combined with the
.B \-\^\-doublespeed
option to double every third frame or things like that.
Don't expect great sound quality when using this option.
.TP
\fB\-E \fIfile\fR, \fB\-\^\-equalizer
Enables equalization, taken from
.IR file .
The file needs to contain 32 lines of data, additional comment lines may
be prefixed with
.IR # .
Each data line consists of two floating-point entries, separated by
whitespace. They specify the multipliers for left and right channel of
a certain frequency band, respectively. The first line corresponds to the
lowest, the 32nd to the highest frequency band.
Note that you can control the equalizer interactively with the generic control interface.
.TP
\fB\-\^\-gapless
Enable code that cuts (junk) samples at beginning and end of tracks, enabling gapless transitions between MPEG files when encoder padding and codec delays would prevent it.
This is enabled per default beginning with mpg123 version 1.0.0 .
.TP
\fB\-\^\-no\-gapless
Disable the gapless code. That gives you MP3 decodings that include encoder delay and padding plus mpg123's decoder delay.
.TP
\fB\-D \fIn\fR, \fB\-\-delay \fIn
Insert a delay of \fIn\fR seconds before each track.
.TP
.BR "\-o h" ", " \-\^\-headphones
Direct audio output to the headphone connector (some hardware only; AIX, HP, SUN).
.TP
.BR "\-o s" ", " \-\^\-speaker
Direct audio output to the speaker (some hardware only; AIX, HP, SUN).
.TP
.BR "\-o l" ", " \-\^\-lineout
Direct audio output to the line-out connector (some hardware only; AIX, HP, SUN).
.TP
\fB\-b \fIsize\fR, \fB\-\^\-buffer \fIsize
Use an audio output buffer of
.I size
Kbytes. This is useful to bypass short periods of heavy
system activity, which would normally cause the audio output
to be interrupted.
You should specify a buffer size of at least 1024
(i.e. 1 Mb, which equals about 6 seconds of audio data) or more;
less than about 300 does not make much sense. The default is 0,
which turns buffering off.
.TP
\fB\-\^\-preload \fIfraction
Wait for the buffer to be filled to
.I fraction
before starting playback (fraction between 0 and 1). You can tune this prebuffering to either get faster sound to your ears or safer uninterrupted web radio.
Default is 1 (wait for full buffer before playback).
.TP
\fB\-\^\-smooth
Keep buffer over track boundaries -- meaning, do not empty the buffer between tracks for possibly some added smoothness.
.SH MISC OPTIONS
.TP
.BR \-t ", " \-\^\-test
Test mode. The audio stream is decoded, but no output occurs.
.TP
.BR \-c ", " \-\^\-check
Check for filter range violations (clipping), and report them for each frame
if any occur.
.TP
.BR \-v ", " \-\^\-verbose
Increase the verbosity level. For example, displays the frame
numbers during decoding.
.TP
.BR \-q ", " \-\^\-quiet
Quiet. Suppress diagnostic messages.
.TP
.BR \-C ", " \-\^\-control
Enable terminal control keys. By default use 's' or the space bar to stop/restart (pause, unpause) playback, 'f' to jump forward to the next song, 'b' to jump back to the
beginning of the song, ',' to rewind, '.' to fast forward, and 'q' to quit.
Type 'h' for a full list of available controls.
.TP
\fB\-\^\-title
In an xterm, or rxvt (compatible, TERM environment variable is examined), change the window's title to the name of song currently
playing.
.TP
\fB\-\^\-long\-tag
Display ID3 tag info always in long format with one line per item (artist, title, ...)
.TP
.BR \-\-utf8
Regardless of environment, print metadata in UTF-8 (otherwise, when not using UTF-8 locale, you'll get ASCII stripdown).
.TP
.BR \-R ", " \-\^\-remote
Activate generic control interface.
.B mpg123
will then read and execute commands from stdin. Basic usage is ``load <filename> '' to play some file and the obvious ``pause'', ``command.
``jump <frame>'' will jump/seek to a given point (MPEG frame number).
Issue ``help'' to get a full list of commands and syntax.
.TP
.BR \-\^\-remote\-err
Print responses for generic control mode to standard error, not standard out.
This is automatically triggered when using
.B -s
\fN.
.TP
\fB\-\-fifo \fIpath
Create a fifo / named pipe on the given path and use that for reading commands instead of standard input.
.TP
\fB\-\^\-aggressive
Tries to get higher priority
.TP
.BR \-T ", " \-\-realtime
Tries to gain realtime priority. This option usually requires root
privileges to have any effect.
.TP
.BR \-? ", " \-\^\-help
Shows short usage instructions.
.TP
.BR \-\^\-longhelp
Shows long usage instructions.
.TP
.BR \-\^\-version
Print the version string.
.SH HTTP SUPPORT
In addition to reading MPEG audio streams from ordinary
files and from the standard input,
.B mpg123
supports retrieval of MPEG audio files or playlists via the HTTP protocol,
which is used in the World Wide Web (WWW). Such files are
specified using a so-called URL, which starts with ``http://''. When a file with
that prefix is encountered,
.B mpg123
attempts to open an HTTP connection to the server in order to
retrieve that file to decode and play it.
.P
It is often useful to retrieve files through a WWW cache or
so-called proxy. To accomplish this,
.B mpg123
examines the environment for variables named
.BR MP3_HTTP_PROXY ", " http_proxy " and " HTTP_PROXY ,
in this order. The value of the first one that is set will
be used as proxy specification. To override this, you can
use the
.B \-p
command line option (see the ``OPTIONS'' section). Specifying
.B "\-p none"
will enforce contacting the server directly without using
any proxy, even if one of the above environment variables
is set.
.P
Note that, in order to play MPEG audio files from a WWW
server, it is necessary that the connection to that server
is fast enough. For example, a 128 kbit/s MPEG file
requires the network connection to be at least 128 kbit/s
(16 kbyte/s) plus protocol overhead. If you suffer from
short network outages, you should try the
.B \-b
option (buffer) to bypass such outages. If your network
connection is generally not fast enough to retrieve MPEG
audio files in realtime, you can first download the files
to your local harddisk (e.g. using
.BR wget (1))
and then play them from there.
.P
If authentication is needed to access the file it can be
specified with the
.BR "\-u user:pass".
.SH INTERRUPT
When in terminal control mode, you can quit via pressing the q key,
while any time you can abort
.B mpg123
by pressing Ctrl-C. If not in terminal control mode, this will
skip to the next file (if any). If you want to abort playing immediately
in that case, press Ctrl-C twice in short succession (within about one second).
.P
Note that the result of quitting
.B mpg123
pressing Ctrl-C might not be audible
immediately, due to audio data buffering in the audio device.
This delay is system dependent, but it is usually not more
than one or two seconds.
.SH "SEE ALSO"
.BR wget (1),
.BR sox (1),
.SH NOTES
MPEG audio decoding requires a good deal of CPU performance,
especially layer-3. To decode it in realtime, you should
have at least an i486DX4, Pentium, Alpha, SuperSparc or equivalent
processor. You can also use the
.B -m
option to decode mono only, which reduces the CPU load
somewhat for layer-3 streams. See also the
.BR \-2 " and " \-4
options.
.P
If everything else fails, use the
.B \-s
option to decode to standard output, direct it into a file
and then use an appropriate utility to play that file.
You might have to use a tool such as
.BR sox (1)
to convert the output to an audio format suitable for
your audio player.
.P
If your system is generally fast enough to decode in
realtime, but there are sometimes periods of heavy
system load (such as cronjobs, users logging in remotely,
starting of ``big'' programs etc.) causing the
audio output to be interrupted, then you should use
the
.B \-b
option to use a buffer of reasonable size (at least 1000 Kbytes).
.SH BUGS
.P
Mostly MPEG-1 layer 2 and 3 are tested in real life.
Please report any issues and provide test files to help fixing them.
.P
Free format streams are not supported, but they could be (there is some code).
.P
No CRC error checking is performed.
.P
Some platforms lack audio hardware support; you may be able to use the
.B -s
switch to feed the decoded data to a program that can play it on your audio device.
Notably, this includes Tru64 with MME, but you should be able to install and use OSS there (it perhaps will perform better as MME would anyway).
.SH AUTHORS
.TP
Maintainers:
.br
Thomas Orgis <maintainer@mpg123.org>, <thomas@orgis.org>
.br
Nicholas J. Humfrey
.TP
Creator:
.br
Michael Hipp
.TP
Uses code or ideas from various people, see the AUTHORS file accompanying the source code.
.SH LICENSE
.B mpg123
is licensed under the GNU Lesser/Library General Public License, LGPL, version 2.1 .
.SH WEBSITE
http://www.mpg123.org
.br
http://sourceforge.net/projects/mpg123

View file

@ -0,0 +1,255 @@
# This file is used with the GYP meta build system.
# http://code.google.com/p/gyp
# To build try this:
# svn co http://gyp.googlecode.com/svn/trunk gyp
# ./gyp/gyp -f make --depth=. mpg123.gyp
# make
# ./out/Debug/test
{
'variables': {
'target_arch%': 'ia32',
},
'target_defaults': {
'default_configuration': 'Debug',
'configurations': {
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
},
},
},
'Release': {
'defines': [ 'NDEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
},
},
}
},
'msvs_settings': {
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
},
},
'conditions': [
['OS=="mac"', {
'conditions': [
['target_arch=="ia32"', { 'xcode_settings': { 'ARCHS': [ 'i386' ] } }],
['target_arch=="x64"', { 'xcode_settings': { 'ARCHS': [ 'x86_64' ] } }]
],
}],
]
},
'targets': [
{
'target_name': 'mpg123',
'product_prefix': 'lib',
'type': 'static_library',
'variables': {
'conditions': [
# "mpg123_cpu" is the cpu optimization to use
# Windows uses "i386_fpu" even on x64 to avoid compiling .S asm files
# (I don't think the 64-bit ASM files are compatible with `ml`/`ml64`...)
['OS=="win"', { 'mpg123_cpu%': 'i386_fpu' },
{ 'conditions': [
['target_arch=="arm"', { 'mpg123_cpu%': 'arm_nofpu' }],
['target_arch=="ia32"', { 'mpg123_cpu%': 'i386_fpu' }],
['target_arch=="x64"', { 'mpg123_cpu%': 'x86-64' }],
]}],
]
},
'sources': [
'src/libmpg123/compat.c',
'src/libmpg123/parse.c',
'src/libmpg123/frame.c',
'src/libmpg123/format.c',
'src/libmpg123/dct64.c',
'src/libmpg123/equalizer.c',
'src/libmpg123/id3.c',
'src/libmpg123/optimize.c',
'src/libmpg123/readers.c',
'src/libmpg123/tabinit.c',
'src/libmpg123/libmpg123.c',
'src/libmpg123/index.c',
'src/libmpg123/stringbuf.c',
'src/libmpg123/icy.c',
'src/libmpg123/icy2utf8.c',
'src/libmpg123/ntom.c',
'src/libmpg123/synth.c',
'src/libmpg123/synth_8bit.c',
'src/libmpg123/layer1.c',
'src/libmpg123/layer2.c',
'src/libmpg123/layer3.c',
'src/libmpg123/feature.c',
],
'include_dirs': [
'src/libmpg123',
# platform and arch-specific headers
'config/<(OS)/<(target_arch)',
],
'defines': [
'PIC',
'NOXFERMEM',
'HAVE_CONFIG_H',
],
'direct_dependent_settings': {
'include_dirs': [
'src/libmpg123',
# platform and arch-specific headers
'config/<(OS)/<(target_arch)',
]
},
'conditions': [
['mpg123_cpu=="arm_nofpu"', {
'defines': [
'OPT_ARM',
'REAL_IS_FIXED',
'NEWOLD_WRITE_SAMPLE',
],
'sources': [
'src/libmpg123/synth_arm.S',
],
}],
['mpg123_cpu=="i386_fpu"', {
'defines': [
'OPT_I386',
'REAL_IS_FLOAT',
'NEWOLD_WRITE_SAMPLE',
],
'sources': [
'src/libmpg123/synth_s32.c',
'src/libmpg123/synth_real.c',
'src/libmpg123/dct64_i386.c',
],
}],
['mpg123_cpu=="x86-64"', {
'defines': [
'OPT_X86_64',
'REAL_IS_FLOAT',
],
'sources': [
'src/libmpg123/dct64_x86_64.S',
'src/libmpg123/dct64_x86_64_float.S',
'src/libmpg123/synth_s32.c',
'src/libmpg123/synth_real.c',
'src/libmpg123/synth_stereo_x86_64.S',
'src/libmpg123/synth_stereo_x86_64_float.S',
'src/libmpg123/synth_stereo_x86_64_s32.S',
'src/libmpg123/synth_x86_64.S',
'src/libmpg123/synth_x86_64_s32.S',
'src/libmpg123/synth_x86_64_float.S',
],
}],
],
},
{
'target_name': 'output',
'product_prefix': 'lib',
'type': 'static_library',
'variables': {
'conditions': [
# "mpg123_backend" is the audio backend to use
['OS=="mac"', { 'mpg123_backend%': 'coreaudio' }],
['OS=="win"', { 'mpg123_backend%': 'win32' }],
['OS=="linux"', { 'mpg123_backend%': 'alsa' }],
['OS=="freebsd"', { 'mpg123_backend%': 'alsa' }],
['OS=="solaris"', { 'mpg123_backend%': 'sun' }],
]
},
'include_dirs': [
'src',
'src/output',
'src/libmpg123',
# platform and arch-specific headers
'config/<(OS)/<(target_arch)',
],
'defines': [
'PIC',
'NOXFERMEM',
'REAL_IS_FLOAT',
'HAVE_CONFIG_H',
'BUILDING_OUTPUT_MODULES=1'
],
'direct_dependent_settings': {
'include_dirs': [
'src',
'src/output',
'src/libmpg123',
# platform and arch-specific headers
'config/<(OS)/<(target_arch)',
]
},
'conditions': [
['mpg123_backend=="alsa"', {
'link_settings': {
'libraries': [
'-lasound',
]
}
}],
['mpg123_backend=="coreaudio"', {
'link_settings': {
'libraries': [
'-framework AudioToolbox',
'-framework AudioUnit',
'-framework CoreServices',
],
},
}],
['mpg123_backend=="openal"', {
'defines': [
'OPENAL_SUBDIR_OPENAL'
],
'link_settings': {
'libraries': [
'-framework OpenAL',
]
}
}],
['mpg123_backend=="win32"', {
'link_settings': {
'libraries': [
'-lwinmm.lib',
],
}
}],
['mpg123_backend=="pulse"', {
'link_settings': {
'libraries': [
'-lpulse',
'-lpulse-simple',
],
}
}],
['mpg123_backend=="jack"', {
'link_settings': {
'libraries': [
'-ljack',
],
}
}],
],
'sources': [ 'src/output/<(mpg123_backend).c' ],
},
{
'target_name': 'test',
'type': 'executable',
'dependencies': [ 'mpg123' ],
'sources': [ 'test.c' ]
},
{
'target_name': 'output_test',
'type': 'executable',
'dependencies': [ 'output' ],
'sources': [ 'test_output.c' ]
}
]
}

View file

@ -0,0 +1,68 @@
# This is a generic spec file that should "just work" with rpmbuild on any distro.
# Make sure you have appropriate -devel packes installed:
# - the package providing libltdl.so and .la (libtool or libtool-devel)
# - devel packages for alsa, sdl, etc... to build the respective output modules.
Summary: The fast console mpeg audio decoder/player.
Name: mpg123
Version: 1.14.4
Release: 1
URL: http://www.mpg123.org/
License: GPL
Group: Applications/Multimedia
Packager: Michael Ryzhykh <mclroy@gmail.com>
Source: http://www.mpg123.org/download/mpg123-%{version}.tar.bz2
BuildRoot: %_tmppath/%name-%version
Prefix: /usr
# That is specific to fedora 4 already.
#BuildPrereq: libtool-ltdl-devel
%description
This is a console based decoder/player for mono/stereo mpeg audio files,
probably more familiar as MP3 or MP2 files. It's focus is speed.
It can play MPEG1.0/2.0/2.5 layer I, II, II (1, 2, 3;-) files
(VBR files are fine, too) and produce output on a number of different ways:
raw data to stdout and different sound systems depending on your platform.
%package devel
Summary: Files needed for development with mpg123
Group: Development/Libraries
%description devel
Libraries and header files for development with mpg123.
%prep
%setup -q -n %name-%version
%build
%configure --with-cpu=x86_dither --enable-shared --enable-static --disable-ltdl-install
make
%install
%{__rm} -rf %{buildroot}
%makeinstall
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(755,root,root)
%{_bindir}/*
%defattr(644,root,root)
%doc %{_mandir}/*/mpg123.1.gz
%{_libdir}/libmpg123.so.*
%{_libdir}/mpg123/output_*.la
%{_libdir}/mpg123/output_*.so
%files devel
%defattr(644,root,root)
%{_libdir}/pkgconfig/libmpg123.pc
%{_includedir}/*.h
%{_libdir}/libmpg123.a
%{_libdir}/libmpg123.la
%{_libdir}/libmpg123.so
%exclude %{_libdir}/mpg123/output_*.a
%changelog
* Tue Jan 1 2008 Michael Ryzhykh <mclroy@gmail.com>
- Initial Version.

View file

@ -0,0 +1,68 @@
# This is a generic spec file that should "just work" with rpmbuild on any distro.
# Make sure you have appropriate -devel packes installed:
# - the package providing libltdl.so and .la (libtool or libtool-devel)
# - devel packages for alsa, sdl, etc... to build the respective output modules.
Summary: The fast console mpeg audio decoder/player.
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1
URL: http://www.mpg123.org/
License: GPL
Group: Applications/Multimedia
Packager: Michael Ryzhykh <mclroy@gmail.com>
Source: http://www.mpg123.org/download/mpg123-%{version}.tar.bz2
BuildRoot: %_tmppath/%name-%version
Prefix: /usr
# That is specific to fedora 4 already.
#BuildPrereq: libtool-ltdl-devel
%description
This is a console based decoder/player for mono/stereo mpeg audio files,
probably more familiar as MP3 or MP2 files. It's focus is speed.
It can play MPEG1.0/2.0/2.5 layer I, II, II (1, 2, 3;-) files
(VBR files are fine, too) and produce output on a number of different ways:
raw data to stdout and different sound systems depending on your platform.
%package devel
Summary: Files needed for development with mpg123
Group: Development/Libraries
%description devel
Libraries and header files for development with mpg123.
%prep
%setup -q -n %name-%version
%build
%configure --with-cpu=x86_dither --enable-shared --enable-static --disable-ltdl-install
make
%install
%{__rm} -rf %{buildroot}
%makeinstall
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(755,root,root)
%{_bindir}/*
%defattr(644,root,root)
%doc %{_mandir}/*/mpg123.1.gz
%{_libdir}/libmpg123.so.*
%{_libdir}/mpg123/output_*.la
%{_libdir}/mpg123/output_*.so
%files devel
%defattr(644,root,root)
%{_libdir}/pkgconfig/libmpg123.pc
%{_includedir}/*.h
%{_libdir}/libmpg123.a
%{_libdir}/libmpg123.la
%{_libdir}/libmpg123.so
%exclude %{_libdir}/mpg123/output_*.a
%changelog
* Tue Jan 1 2008 Michael Ryzhykh <mclroy@gmail.com>
- Initial Version.

View file

@ -0,0 +1,56 @@
#!/usr/bin/perl
#
# benchmark-cpu.pl: benchmark CPU optimizations of mpg123
#
# initially written by Nicholas J Humfrey <njh@aelius.com>, placed in the public domain
#
use strict;
#use Time::HiRes qw/time/;
my $MPG123_CMD = shift @ARGV;
my @TEST_FILES = @ARGV;
die "Please specify full path to mpg123 >= 1.7.0 and a test MP3 file to decode" if (scalar(@ARGV) < 1);
die "mpg123 command does not exist" unless (-e $MPG123_CMD);
die "mpg123 command is not executable" unless (-x $MPG123_CMD);
for(@TEST_FILES)
{
die "test MP3 file does not exist" unless (-e $_);
}
# Force unbuffed output on STDOUT
#$|=1; # why?
# Check the CPUs available
my $cpulist = `$MPG123_CMD --test-cpu`;
chomp( $cpulist );
die "Failed to get list of available CPU optimizations" unless ($cpulist =~ s/^Supported decoders: //);
my @cpus = split( / /, $cpulist );
my @encs = qw(s16 f32);
printf STDERR ("Found %d CPU optimizations to test...\n\n", scalar(@cpus) );
print "#mpg123 benchmark (user CPU time in seconds for decoding)\n";
print "#decoder";
for(@encs){ print " t_$_/s"; }
print "\n";
foreach my $cpu (@cpus)
{
print "$cpu";
foreach my $e (@encs)
{
# using user CPU time
my @start_time = times();
system($MPG123_CMD, '-q', '--cpu', $cpu, '-e', $e, '-t', @TEST_FILES );
my @end_time = times();
# third entry is child user time
printf(" %4.2f", $end_time[2] - $start_time[2]);
}
print("\n");
}

View file

@ -0,0 +1,76 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# needs mutagen
# grabbed from: http://code.activestate.com/recipes/577138-embed-lyrics-into-mp3-files-using-mutagen-uslt-tag/
# simplified to only work on one file and get lyrics from stdin
# I suspect this is public domain code. Just a usage example of the mutagen lib.
import os
import sys
import codecs
from mutagen.mp3 import MP3
from mutagen.id3 import ID3NoHeaderError
from mutagen.id3 import ID3, USLT
TEXT_ENCODING = 'utf8'
TEXT_LANG = 'XXX'
TEXT_DESC = ''
# get workdir from first arg or use current dir
if (len(sys.argv) > 1):
fname = sys.argv[1]
print "fname=" + fname
else:
print 'Give me at least a file name to work on, plus the lyrics from stdin'
print 'Optionally, you can provide the language (3 lowercase letters) of the lyrics and a description'
sys.exit()
if (len(sys.argv) > 2):
TEXT_LANG = sys.argv[2]
if (len(sys.argv) > 3):
TEXT_DESC = sys.argv[3]
print "reading lyrics from standard input ..."
lyrics = sys.stdin.read().strip()
# try to find the right encoding
for enc in ('utf8','iso-8859-1','iso-8859-15','cp1252','cp1251','latin1'):
try:
lyrics = lyrics.decode(enc)
TEXT_DESC = TEXT_DESC.decode(enc)
print enc,
break
except:
pass
print "Adding lyrics to " + fname
print "Language: " + TEXT_LANG
print "Description: " + TEXT_DESC
# create ID3 tag if not exists
try:
tags = ID3(fname)
except ID3NoHeaderError:
print "Adding ID3 header;",
tags = ID3()
# remove old unsychronized lyrics
if len(tags.getall(u"USLT::'"+TEXT_LANG+"'")) != 0:
print "Removing Lyrics."
tags.delall(u"USLT::'"+TEXT_LANG+"'")
#tags.save(fname) # hm, why?
#tags.add(USLT(encoding=3, lang=u'eng', desc=u'desc', text=lyrics))
# apparently the description is important when more than one
# USLT frames are present
#tags[u"USLT::'eng'"] = (USLT(encoding=3, lang=u'eng', desc=u'desc', text=lyrics))
tags[u"USLT::'"+TEXT_LANG+"'"] = (USLT(encoding=3, lang=TEXT_LANG, desc=TEXT_DESC, text=lyrics))
print 'Added USLT frame to', fname
tags.save(fname)
print 'Done'

View file

@ -0,0 +1,186 @@
## Makefile.am: produce Makefile.in from this
## copyright by the mpg123 project - free software under the terms of the LGPL 2.1
## see COPYING and AUTHORS files in distribution or http://mpg123.org
## initially written by Nicholas J. Humfrey
AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\""
mpg123_LDADD = $(LIBLTDL) libmpg123/libmpg123.la @MODULE_OBJ@ @OUTPUT_OBJ@ @OUTPUT_LIBS@
mpg123_LDFLAGS = @EXEC_LT_LDFLAGS@ @OUTPUT_LDFLAGS@
# Just mpg123_INCLUDES has no effect on build! Trying that before reverting to AM_CPPFLAGS.
INCLUDES = $(LTDLINCL) -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src/libmpg123
# libltdl is not mentioned here... it's not that trivial
mpg123_DEPENDENCIES = @OUTPUT_OBJ@ @MODULE_OBJ@ libmpg123/libmpg123.la
SUBDIRS = output libmpg123
EXTRA_DIST = legacy_module.c module.c sfifo.c sfifo.h
CLEANFILES = *.a
bin_PROGRAMS = mpg123
EXTRA_PROGRAMS = tests/seek_accuracy tests/seek_whence tests/noise tests/text tests/plain_id3
mpg123_SOURCES = \
audio.c \
audio.h \
buffer.c \
buffer.h \
common.c \
common.h \
libmpg123/compat.c \
libmpg123/compat.h \
control_generic.c \
equalizer.c \
getlopt.c \
getlopt.h \
httpget.c \
httpget.h \
resolver.c \
resolver.h \
genre.h \
genre.c \
module.h \
mpg123.c \
mpg123app.h \
metaprint.c \
metaprint.h \
local.h \
local.c \
playlist.c \
playlist.h \
streamdump.h \
streamdump.c \
term.c \
term.h \
wav.c \
win32_support.h \
wavhead.h \
xfermem.c \
xfermem.h
if WIN32_CODES
mpg123_SOURCES += \
win32_support.c \
win32_net.c
endif
# That is not nice... but it is how I manage to get the dependency on output/alsa.o without error about .deps/output/alsa.Tpo .
# Did I mention that recursive make sucks?
# `%'-style pattern rules are a GNU make extension
#find output/ -name '*.c' | perl -ne 'chomp; $mod=$_; $mod=~s/\.c$/.\$(OBJEXT)/;
#print "$mod: $_ audio.h module.h\n";
#print "\tcd output && \$(MAKE)\n\n";'
output/coreaudio.$(OBJEXT): output/coreaudio.c audio.h module.h
cd output && $(MAKE)
output/win32.$(OBJEXT): output/win32.c audio.h module.h
cd output && $(MAKE)
output/alsa05.$(OBJEXT): output/alsa05.c audio.h module.h
cd output && $(MAKE)
output/sdl.$(OBJEXT): output/sdl.c audio.h module.h
cd output && $(MAKE)
output/dummy.$(OBJEXT): output/dummy.c audio.h module.h
cd output && $(MAKE)
output/alib.$(OBJEXT): output/alib.c audio.h module.h
cd output && $(MAKE)
output/libao.$(OBJEXT): output/libao.c audio.h module.h
cd output && $(MAKE)
output/sun.$(OBJEXT): output/sun.c audio.h module.h
cd output && $(MAKE)
output/aix.$(OBJEXT): output/aix.c audio.h module.h
cd output && $(MAKE)
output/oss.$(OBJEXT): output/oss.c audio.h module.h
cd output && $(MAKE)
output/mint.$(OBJEXT): output/mint.c audio.h module.h
cd output && $(MAKE)
output/pulse.$(OBJEXT): output/pulse.c audio.h module.h
cd output && $(MAKE)
output/jack.$(OBJEXT): output/jack.c audio.h module.h
cd output && $(MAKE)
output/os2.$(OBJEXT): output/os2.c audio.h module.h
cd output && $(MAKE)
output/nas.$(OBJEXT): output/nas.c audio.h module.h
cd output && $(MAKE)
output/sgi.$(OBJEXT): output/sgi.c audio.h module.h
cd output && $(MAKE)
output/portaudio.$(OBJEXT): output/portaudio.c audio.h module.h
cd output && $(MAKE)
output/arts.$(OBJEXT): output/arts.c audio.h module.h
cd output && $(MAKE)
output/esd.$(OBJEXT): output/esd.c audio.h module.h
cd output && $(MAKE)
output/alsa.$(OBJEXT): output/alsa.c audio.h module.h
cd output && $(MAKE)
output/hp.$(OBJEXT): output/hp.c audio.h module.h
cd output && $(MAKE)
output/sndio.$(OBJEXT): output/sndio.c audio.h module.h
cd output && $(MAKE)
# Would have to mention _all_ source files... Dammit, that's what the libmpg123/Makefile.am does!
# But again, the a make $something here needs that stupid rule... WHY???
libmpg123/libmpg123.la: config.h libmpg123/mpg123.h
cd libmpg123 && $(MAKE)
tests_seek_accuracy_SOURCES = \
tests/seek_accuracy.c \
libmpg123/compat.h \
libmpg123/compat.c
tests_seek_accuracy_DEPENDENCIES = libmpg123/libmpg123.la
tests_seek_accuracy_LDADD = libmpg123/libmpg123.la
tests_seek_whence_SOURCES = \
tests/seek_whence.c \
libmpg123/compat.h \
libmpg123/compat.c
tests_seek_whence_DEPENDENCIES = libmpg123/libmpg123.la
tests_seek_whence_LDADD = libmpg123/libmpg123.la
tests_noise_SOURCES = \
tests/noise.c \
libmpg123/compat.h \
libmpg123/compat.c \
libmpg123/dither.h \
libmpg123/dither.c
tests_text_SOURCES = \
tests/text.c \
tests/testtext.h \
libmpg123/compat.h \
libmpg123/compat.c
tests_text_DEPENDENCIES = libmpg123/libmpg123.la
tests_text_LDADD = libmpg123/libmpg123.la
tests_plain_id3_SOURCES = \
tests/plain_id3.c \
libmpg123/compat.h \
libmpg123/compat.c
tests_plain_id3_DEPENDENCIES = libmpg123/libmpg123.la
tests_plain_id3_LDADD = libmpg123/libmpg123.la

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,725 @@
/*
audio: audio output interface
copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Michael Hipp
*/
#include <errno.h>
#include "mpg123app.h"
#include "common.h"
#include "buffer.h"
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include "debug.h"
static int file_write(struct audio_output_struct* ao, unsigned char *bytes, int count)
{
return (int)write(ao->fn, bytes, count);
}
static int wave_write(struct audio_output_struct* ao, unsigned char *bytes, int count)
{
return wav_write(bytes, count);
}
static int builtin_get_formats(struct audio_output_struct *ao)
{
if(param.outmode == DECODE_CDR)
{
if(ao->rate == 44100 && ao->channels == 2)
return MPG123_ENC_SIGNED_16;
else
return 0;
}
else if(param.outmode == DECODE_AU) return MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_8|MPG123_ENC_ULAW_8;
else if(param.outmode == DECODE_WAV) return MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_8|MPG123_ENC_FLOAT_32|MPG123_ENC_SIGNED_24|MPG123_ENC_SIGNED_32;
else return MPG123_ENC_ANY;
}
static int builtin_close(struct audio_output_struct *ao)
{
switch(param.outmode)
{
case DECODE_WAV:
return wav_close();
break;
case DECODE_AU:
return au_close();
break;
case DECODE_CDR:
return cdr_close();
break;
}
return -1;
}
static int builtin_nothingint(struct audio_output_struct *ao){ return 0; }
static void builtin_nothing(struct audio_output_struct *ao){}
audio_output_t* open_fake_module(void)
{
audio_output_t *ao = NULL;
ao = alloc_audio_output();
if(ao == NULL)
{
error("Cannot allocate memory for audio output data.");
return NULL;
}
ao->module = NULL;
ao->open = builtin_nothingint;
ao->flush = builtin_nothing;
ao->get_formats = builtin_get_formats;
ao->write = wave_write;
ao->close = builtin_close;
ao->device = param.filename;
ao->is_open = FALSE;
switch(param.outmode)
{
case DECODE_FILE:
ao->fn = OutputDescriptor;
ao->write = file_write;
break;
case DECODE_WAV:
ao->open = wav_open;
break;
case DECODE_CDR:
ao->open = cdr_open;
break;
case DECODE_AU:
ao->open = au_open;
break;
case DECODE_TEST:
break;
}
return ao;
}
/* Open an audio output module, trying modules in list (comma-separated). */
audio_output_t* open_output_module( const char* names )
{
mpg123_module_t *module = NULL;
audio_output_t *ao = NULL;
int result = 0;
char *curname, *modnames;
if(param.usebuffer || names==NULL) return NULL;
/* Use internal code. */
if(param.outmode != DECODE_AUDIO) return open_fake_module();
modnames = strdup(names);
if(modnames == NULL)
{
error("Error allocating memory for module names.");
return NULL;
}
/* Now loop over the list of possible modules to find one that works. */
curname = strtok(modnames, ",");
while(curname != NULL)
{
char* name = curname;
curname = strtok(NULL, ",");
if(param.verbose > 1) fprintf(stderr, "Trying output module %s.\n", name);
/* Open the module, initial check for availability+libraries. */
module = open_module( "output", name );
if(module == NULL) continue;
/* Check if module supports output */
if(module->init_output == NULL)
{
error1("Module '%s' does not support audio output.", name);
close_module(module);
continue; /* Try next one. */
}
/* Allocation+initialization of memory for audio output type. */
ao = alloc_audio_output();
if(ao==NULL)
{
error("Failed to allocate audio output structure.");
close_module(module);
break; /* This is fatal. */
}
/* Call the init function */
ao->device = param.output_device;
ao->flags = param.output_flags;
/* Should I do funny stuff with stderr file descriptor instead? */
if(curname == NULL)
{
if(param.verbose > 1)
fprintf(stderr, "Note: %s is the last output option... showing you any error messages now.\n", name);
}
else ao->auxflags |= MPG123_OUT_QUIET; /* Probing, so don't spill stderr with errors. */
ao->is_open = FALSE;
ao->module = module; /* Need that to close module later. */
result = module->init_output(ao);
if(result == 0)
{ /* Try to open the device. I'm only interested in actually working modules. */
result = open_output(ao);
close_output(ao);
}
else error2("Module '%s' init failed: %i", name, result);
if(result!=0)
{ /* Try next one... */
close_module(module);
free(ao);
ao = NULL;
}
else
{ /* All good, leave the loop. */
if(param.verbose > 1) fprintf(stderr, "Output module '%s' chosen.\n", name);
ao->auxflags &= ~MPG123_OUT_QUIET;
break;
}
}
free(modnames);
if(ao==NULL) error1("Unable to find a working output module in this list: %s", names);
return ao;
}
/* Close the audio output and close the module */
void close_output_module( audio_output_t* ao )
{
if (!ao) return; /* That covers buffer mode, too (ao == NULL there). */
debug("closing output module");
/* Close the audio output */
if(ao->is_open && ao->close != NULL) ao->close(ao);
/* Deinitialise the audio output */
if (ao->deinit) ao->deinit( ao );
/* Unload the module */
if (ao->module) close_module( ao->module );
/* Free up memory */
free( ao );
}
/* allocate and initialise memory */
audio_output_t* alloc_audio_output()
{
audio_output_t* ao = malloc( sizeof( audio_output_t ) );
if (ao==NULL) error( "Failed to allocate memory for audio_output_t." );
/* Initialise variables */
ao->fn = -1;
ao->rate = -1;
ao->gain = param.gain;
ao->userptr = NULL;
ao->device = NULL;
ao->channels = -1;
ao->format = -1;
ao->flags = 0;
ao->auxflags = 0;
/*ao->module = NULL;*/
/* Set the callbacks to NULL */
ao->open = NULL;
ao->get_formats = NULL;
ao->write = NULL;
ao->flush = NULL;
ao->close = NULL;
ao->deinit = NULL;
return ao;
}
/*
static void audio_output_dump(audio_output_t *ao)
{
fprintf(stderr, "ao->fn=%d\n", ao->fn);
fprintf(stderr, "ao->userptr=%p\n", ao->userptr);
fprintf(stderr, "ao->rate=%ld\n", ao->rate);
fprintf(stderr, "ao->gain=%ld\n", ao->gain);
fprintf(stderr, "ao->device='%s'\n", ao->device);
fprintf(stderr, "ao->channels=%d\n", ao->channels);
fprintf(stderr, "ao->format=%d\n", ao->format);
}
*/
struct enc_desc
{
int code; /* MPG123_ENC_SOMETHING */
const char *longname; /* signed bla bla */
const char *name; /* sXX, short name */
const unsigned char nlen; /* significant characters in short name */
};
static const struct enc_desc encdesc[] =
{
{ MPG123_ENC_SIGNED_16, "signed 16 bit", "s16 ", 3 },
{ MPG123_ENC_UNSIGNED_16, "unsigned 16 bit", "u16 ", 3 },
{ MPG123_ENC_UNSIGNED_8, "unsigned 8 bit", "u8 ", 2 },
{ MPG123_ENC_SIGNED_8, "signed 8 bit", "s8 ", 2 },
{ MPG123_ENC_ULAW_8, "mu-law (8 bit)", "ulaw ", 4 },
{ MPG123_ENC_ALAW_8, "a-law (8 bit)", "alaw ", 4 },
{ MPG123_ENC_FLOAT_32, "float (32 bit)", "f32 ", 3 },
{ MPG123_ENC_SIGNED_32, "signed 32 bit", "s32 ", 3 },
{ MPG123_ENC_UNSIGNED_32, "unsigned 32 bit", "u32 ", 3 },
{ MPG123_ENC_SIGNED_24, "signed 24 bit", "s24 ", 3 },
{ MPG123_ENC_UNSIGNED_24, "unsigned 24 bit", "u24 ", 3 }
};
#define KNOWN_ENCS (sizeof(encdesc)/sizeof(struct enc_desc))
void audio_enclist(char** list)
{
size_t length = 0;
int i;
*list = NULL;
for(i=0;i<KNOWN_ENCS;++i) length += encdesc[i].nlen;
length += KNOWN_ENCS-1; /* spaces between the encodings */
*list = malloc(length+1); /* plus zero */
if(*list != NULL)
{
size_t off = 0;
(*list)[length] = 0;
for(i=0;i<KNOWN_ENCS;++i)
{
if(i>0) (*list)[off++] = ' ';
memcpy(*list+off, encdesc[i].name, encdesc[i].nlen);
off += encdesc[i].nlen;
}
}
}
/* Safer as function... */
const char* audio_encoding_name(const int encoding, const int longer)
{
const char *name = longer ? "unknown" : "???";
int i;
for(i=0;i<KNOWN_ENCS;++i)
if(encdesc[i].code == encoding)
name = longer ? encdesc[i].longname : encdesc[i].name;
return name;
}
static void capline(mpg123_handle *mh, long rate)
{
int enci;
const int *encs;
size_t num_encs;
mpg123_encodings(&encs, &num_encs);
fprintf(stderr," %5ld |", pitch_rate(rate));
for(enci=0; enci<num_encs; ++enci)
{
switch(mpg123_format_support(mh, rate, encs[enci]))
{
case MPG123_MONO: fprintf(stderr, " M |"); break;
case MPG123_STEREO: fprintf(stderr, " S |"); break;
case MPG123_MONO|MPG123_STEREO: fprintf(stderr, " M/S |"); break;
default: fprintf(stderr, " |");
}
}
fprintf(stderr, "\n");
}
void print_capabilities(audio_output_t *ao, mpg123_handle *mh)
{
int r,e;
const long *rates;
size_t num_rates;
const int *encs;
size_t num_encs;
const char *name = "<buffer>";
const char *dev = "<none>";
if(!param.usebuffer)
{
name = ao->module ? ao->module->name : "file/raw/test";
if(ao->device != NULL) dev = ao->device;
}
mpg123_rates(&rates, &num_rates);
mpg123_encodings(&encs, &num_encs);
fprintf(stderr,"\nAudio driver: %s\nAudio device: %s\nAudio capabilities:\n(matrix of [S]tereo or [M]ono support for sample format and rate in Hz)\n |", name, dev);
for(e=0;e<num_encs;e++) fprintf(stderr," %5s |",audio_encoding_name(encs[e], 0));
fprintf(stderr,"\n ------|");
for(e=0;e<num_encs;e++) fprintf(stderr,"-------|");
fprintf(stderr, "\n");
for(r=0; r<num_rates; ++r) capline(mh, rates[r]);
if(param.force_rate) capline(mh, param.force_rate);
fprintf(stderr,"\n");
}
/* This uses the currently opened audio device, queries its caps.
In case of buffered playback, this works _once_ by querying the buffer for the caps before entering the main loop. */
void audio_capabilities(audio_output_t *ao, mpg123_handle *mh)
{
int force_fmt = 0;
int fmts;
size_t ri;
/* Pitching introduces a difference between decoder rate and playback rate. */
long rate, decode_rate;
int channels;
const long *rates;
size_t num_rates, rlimit;
debug("audio_capabilities");
mpg123_rates(&rates, &num_rates);
mpg123_format_none(mh); /* Start with nothing. */
if(param.force_encoding != NULL)
{
int i;
if(!param.quiet) fprintf(stderr, "Note: forcing output encoding %s\n", param.force_encoding);
for(i=0;i<KNOWN_ENCS;++i)
if(!strncasecmp(encdesc[i].name, param.force_encoding, encdesc[i].nlen))
{
force_fmt = encdesc[i].code;
break;
}
if(i==KNOWN_ENCS)
{
error1("Failed to find an encoding to match requested \"%s\"!\n", param.force_encoding);
return; /* No capabilities at all... */
}
else if(param.verbose > 2) fprintf(stderr, "Note: forcing encoding code 0x%x\n", force_fmt);
}
rlimit = param.force_rate > 0 ? num_rates+1 : num_rates;
for(channels=1; channels<=2; channels++)
for(ri = 0;ri<rlimit;ri++)
{
decode_rate = ri < num_rates ? rates[ri] : param.force_rate;
rate = pitch_rate(decode_rate);
if(param.verbose > 2) fprintf(stderr, "Note: checking support for %liHz/%ich.\n", rate, channels);
#ifndef NOXFERMEM
if(param.usebuffer)
{ /* Ask the buffer process. It is waiting for this. */
buffermem->rate = rate;
buffermem->channels = channels;
buffermem->format = 0; /* Just have it initialized safely. */
debug2("asking for formats for %liHz/%ich", rate, channels);
xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_AUDIOCAP);
xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE);
fmts = buffermem->format;
}
else
#endif
{ /* Check myself. */
ao->rate = rate;
ao->channels = channels;
fmts = ao->get_formats(ao);
}
if(param.verbose > 2) fprintf(stderr, "Note: result 0x%x\n", fmts);
if(force_fmt)
{ /* Filter for forced encoding. */
if((fmts & force_fmt) == force_fmt) fmts = force_fmt;
else fmts = 0; /* Nothing else! */
if(param.verbose > 2) fprintf(stderr, "Note: after forcing 0x%x\n", fmts);
}
if(fmts < 0) continue;
else mpg123_format(mh, decode_rate, channels, fmts);
}
#ifndef NOXFERMEM
/* Buffer loop shall start normal operation now. */
if(param.usebuffer)
{
xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP);
xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE);
}
#endif
if(param.verbose > 1) print_capabilities(ao, mh);
}
#if !defined(WIN32) && !defined(GENERIC)
#ifndef NOXFERMEM
static void catch_child(void)
{
while (waitpid(-1, NULL, WNOHANG) > 0);
}
#endif
#endif
/* FIXME: Old output initialization code that needs updating */
int init_output(audio_output_t **ao)
{
static int init_done = FALSE;
if (init_done) return 1;
init_done = TRUE;
#ifndef NOXFERMEM
if (param.usebuffer)
{
unsigned int bufferbytes;
sigset_t newsigset, oldsigset;
bufferbytes = (param.usebuffer * 1024);
if (bufferbytes < bufferblock)
{
bufferbytes = 2*bufferblock;
if(!param.quiet) fprintf(stderr, "Note: raising buffer to minimal size %liKiB\n", (unsigned long) bufferbytes>>10);
}
bufferbytes -= bufferbytes % bufferblock;
/* No +1024 for NtoM rounding problems anymore! */
xfermem_init (&buffermem, bufferbytes ,0,0);
sigemptyset (&newsigset);
/* ThOr: I'm not quite sure why we need to block that signal here. */
sigaddset (&newsigset, SIGUSR1);
sigprocmask (SIG_BLOCK, &newsigset, &oldsigset);
#if !defined(WIN32) && !defined(GENERIC)
catchsignal (SIGCHLD, catch_child);
#endif
switch ((buffer_pid = fork()))
{
case -1: /* error */
error("cannot fork!");
return -1;
case 0: /* child */
{
/* Buffer process handles all audio stuff itself. */
audio_output_t *bao = NULL; /* To be clear: That's the buffer's pointer. */
param.usebuffer = 0; /* The buffer doesn't use the buffer. */
/* Open audio output module */
bao = open_output_module(param.output_module);
if(!bao)
{
error("Failed to open audio output module.");
exit(1); /* communicate failure? */
}
if(open_output(bao) < 0)
{
error("Unable to open audio output.");
close_output_module(bao);
exit(2);
}
xfermem_init_reader (buffermem);
buffer_loop(bao, &oldsigset); /* Here the work happens. */
xfermem_done_reader (buffermem);
xfermem_done (buffermem);
close_output(bao);
close_output_module(bao);
exit(0);
}
default: /* parent */
xfermem_init_writer (buffermem);
}
/* ThOr: I want that USR1 signal back for control. */
sigprocmask(SIG_UNBLOCK, &newsigset, NULL);
}
#else
if(param.usebuffer)
{
error("Buffer not available in this build!");
return -1;
}
#endif
if(!param.usebuffer)
{ /* Only if I handle audio device output: Get that module. */
*ao = open_output_module(param.output_module);
if(!(*ao))
{
error("Failed to open audio output module");
return -1;
}
}
else *ao = NULL; /* That ensures we won't try to free it later... */
#ifndef NOXFERMEM
if(param.usebuffer)
{ /* Check if buffer is alive. */
int res = xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE);
if(res < 0)
{
error("Buffer process didn't initialize!");
return -1;
}
}
#endif
/* This has internal protection for buffer mode. */
if(open_output(*ao) < 0) return -1;
return 0;
}
void exit_output(audio_output_t *ao, int rude)
{
debug("exit output");
#ifndef NOXFERMEM
if (param.usebuffer)
{
debug("ending buffer");
buffer_stop(); /* Puts buffer into waiting-for-command mode. */
buffer_end(rude); /* Gives command to end operation. */
xfermem_done_writer(buffermem);
waitpid (buffer_pid, NULL, 0);
xfermem_done (buffermem);
}
#endif
/* Close the output... doesn't matter if buffer handled it, that's taken care of. */
close_output(ao);
close_output_module(ao);
}
void output_pause(audio_output_t *ao)
{
if(param.usebuffer) buffer_stop();
else ao->flush(ao);
}
void output_unpause(audio_output_t *ao)
{
if(param.usebuffer) buffer_start();
}
int flush_output(audio_output_t *ao, unsigned char *bytes, size_t count)
{
if(count)
{
/* Error checks? */
#ifndef NOXFERMEM
if(param.usebuffer){ if(xfermem_write(buffermem, bytes, count)) return -1; }
else
#endif
if(param.outmode != DECODE_TEST)
{
int sum = 0;
int written;
do
{ /* Be in a loop for SIGSTOP/CONT */
written = ao->write(ao, bytes, (int)count);
if(written >= 0){ sum+=written; count -= written; }
else error1("Error in writing audio (%s?)!", strerror(errno));
} while(count>0 && written>=0);
return sum;
}
}
return (int)count; /* That is for DECODE_TEST */
}
int open_output(audio_output_t *ao)
{
if(param.usebuffer) return 0;
if(ao == NULL)
{
error("ao should not be NULL here!");
exit(110);
}
switch(param.outmode)
{
case DECODE_AUDIO:
case DECODE_WAV:
case DECODE_AU:
case DECODE_CDR:
case DECODE_FILE:
debug("opening normal audio/file");
ao->is_open = ao->open(ao) < 0 ? FALSE : TRUE;
if(!ao->is_open)
{
if(!AOQUIET) error("failed to open audio device");
return -1;
}
else return 0;
break;
case DECODE_TEST:
debug("decoding to nowhere");
return 0;
break;
}
debug("nothing");
return -1; /* That's an error ... unknown outmode? */
}
/* is this used? */
void close_output(audio_output_t *ao)
{
if(param.usebuffer) return;
debug("closing output");
switch(param.outmode)
{
case DECODE_AUDIO:
case DECODE_WAV:
case DECODE_AU:
case DECODE_CDR:
/* Guard that close call; could be nasty. */
if(ao->is_open)
{
ao->is_open = FALSE;
if(ao->close != NULL) ao->close(ao);
}
break;
}
}
/* Also for WAV decoding? */
int reset_output(audio_output_t *ao)
{
if(!param.usebuffer)
{
close_output(ao);
return open_output(ao);
}
else return 0;
}
int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch)
{
int ret = 1;
double old_pitch = param.pitch;
long rate;
int channels, format;
int smode = 0;
/* Be safe, check support. */
if(mpg123_getformat(fr, &rate, &channels, &format) != MPG123_OK)
{
/* We might just not have a track handy. */
error("There is no current audio format, cannot apply pitch. This might get fixed in future.");
return 0;
}
if(param.usebuffer)
{
error("No runtime pitch change with output buffer, sorry.");
return 0;
}
param.pitch = new_pitch;
if(param.pitch < -0.99) param.pitch = -0.99;
if(channels == 1) smode = MPG123_MONO;
if(channels == 2) smode = MPG123_STEREO;
output_pause(ao);
/* Remember: This takes param.pitch into account. */
audio_capabilities(ao, fr);
if(!(mpg123_format_support(fr, rate, format) & smode))
{
/* Note: When using --pitch command line parameter, you can go higher
because a lower decoder sample rate is automagically chosen.
Here, we'd need to switch decoder rate during track... good? */
error("Reached a hardware limit there with pitch!");
param.pitch = old_pitch;
audio_capabilities(ao, fr);
ret = 0;
}
ao->format = format;
ao->channels = channels;
ao->rate = pitch_rate(rate);
reset_output(ao);
output_unpause(ao);
return ret;
}

View file

@ -0,0 +1,106 @@
/*
audio: audio output interface
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Michael Hipp
*/
/*
* Audio 'LIB' defines
*/
#ifndef _MPG123_AUDIO_H_
#define _MPG123_AUDIO_H_
#include "compat.h"
#include "mpg123.h"
#include "module.h"
#define AUDIO_OUT_HEADPHONES 0x01
#define AUDIO_OUT_INTERNAL_SPEAKER 0x02
#define AUDIO_OUT_LINE_OUT 0x04
enum {
DECODE_TEST,
DECODE_AUDIO,
DECODE_FILE,
DECODE_BUFFER,
DECODE_WAV,
DECODE_AU,
DECODE_CDR,
DECODE_AUDIOFILE
};
/* 3% rate tolerance */
#define AUDIO_RATE_TOLERANCE 3
typedef struct audio_output_struct
{
int fn; /* filenumber */
void *userptr; /* driver specific pointer */
/* Callbacks */
int (*open)(struct audio_output_struct *);
int (*get_formats)(struct audio_output_struct *);
int (*write)(struct audio_output_struct *, unsigned char *,int);
void (*flush)(struct audio_output_struct *);
int (*close)(struct audio_output_struct *);
int (*deinit)(struct audio_output_struct *);
/* the module this belongs to */
mpg123_module_t *module;
char *device; /* device name */
int flags; /* some bits; namely headphone/speaker/line */
long rate; /* sample rate */
long gain; /* output gain */
int channels; /* number of channels */
int format; /* format flags */
int is_open; /* something opened? */
#define MPG123_OUT_QUIET 1
int auxflags; /* For now just one: quiet mode (for probing). */
} audio_output_t;
/* Lazy. */
#define AOQUIET (ao->auxflags & MPG123_OUT_QUIET)
struct audio_format_name {
int val;
char *name;
char *sname;
};
#define pitch_rate(rate) (param.pitch == 0 ? (rate) : (long) ((param.pitch+1.0)*(rate)))
/* ------ Declarations from "audio.c" ------ */
audio_output_t* open_output_module( const char* name );
void close_output_module( audio_output_t* ao );
audio_output_t* alloc_audio_output();
void audio_capabilities(audio_output_t *ao, mpg123_handle *mh);
int audio_fit_capabilities(audio_output_t *ao,int c,int r);
const char* audio_encoding_name(const int encoding, const int longer);
void print_capabilities(audio_output_t *ao, mpg123_handle *mh);
int init_output(audio_output_t **ao);
void exit_output(audio_output_t *ao, int rude);
int flush_output(audio_output_t *ao, unsigned char *bytes, size_t count);
int open_output(audio_output_t *ao);
void close_output(audio_output_t *ao );
int reset_output(audio_output_t *ao);
void output_pause(audio_output_t *ao); /* Prepare output for inactivity. */
void output_unpause(audio_output_t *ao); /* Reactivate output (buffer process). */
void audio_enclist(char** list); /* Make a string of encoding names. */
/*
Twiddle audio output rate to yield speedup/down (pitch) effect.
The actually achieved pitch value is stored in param.pitch.
Returns 1 if pitch setting succeeded, 0 otherwise.
*/
int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch);
#endif

View file

@ -0,0 +1,312 @@
/*
buffer.c: output buffer
copyright 1997-2009 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Oliver Fromme
I (ThOr) am reviewing this file at about the same daytime as Oliver's timestamp here:
Mon Apr 14 03:53:18 MET DST 1997
- dammed night coders;-)
*/
#include "mpg123app.h"
#ifndef NOXFERMEM
#include "common.h"
#include <errno.h>
#include "debug.h"
int outburst = 32768;
static int intflag = FALSE;
static int usr1flag = FALSE;
static void catch_interrupt (void)
{
intflag = TRUE;
}
static void catch_usr1 (void)
{
usr1flag = TRUE;
}
/* Interfaces to writer process */
extern void buffer_sig(int signal, int block);
void real_buffer_ignore_lowmem(void)
{
if (!buffermem)
return;
if(buffermem->wakeme[XF_READER])
xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP);
}
void real_buffer_end(int rude)
{
if (!buffermem)
return;
xfermem_putcmd(buffermem->fd[XF_WRITER], rude ? XF_CMD_ABORT : XF_CMD_TERMINATE);
}
void real_buffer_resync(void)
{
if(buffermem->justwait)
{
buffermem->wakeme[XF_WRITER] = TRUE;
xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_RESYNC);
xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE);
}
else buffer_sig(SIGINT, TRUE);
}
void real_plain_buffer_resync(void)
{
buffer_sig(SIGINT, FALSE);
}
void real_buffer_reset(void)
{
buffer_sig(SIGUSR1, TRUE);
}
void real_buffer_start(void)
{
if(buffermem->justwait)
{
debug("ending buffer's waiting");
buffermem->justwait = FALSE;
xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP);
}
}
void real_buffer_stop()
{
buffermem->justwait = TRUE;
buffer_sig(SIGINT, TRUE);
}
extern int buffer_pid;
void buffer_sig(int signal, int block)
{
if (!buffermem) return;
if (!block)
{ /* Just signal, do not wait for anything. */
kill(buffer_pid, signal);
return;
}
/* kill() and the waiting needs to be taken care of properly for parallel execution.
Nobody reported issues so far, but I want to be sure. */
if(xfermem_sigblock(XF_WRITER, buffermem, buffer_pid, signal) != XF_CMD_WAKEUP)
perror("Could not resync/reset buffers");
return;
}
void buffer_loop(audio_output_t *ao, sigset_t *oldsigset)
{
int bytes, outbytes;
int my_fd = buffermem->fd[XF_READER];
txfermem *xf = buffermem;
int done = FALSE;
int preload;
catchsignal (SIGINT, catch_interrupt);
catchsignal (SIGUSR1, catch_usr1);
sigprocmask (SIG_SETMASK, oldsigset, NULL);
xfermem_putcmd(my_fd, XF_CMD_WAKEUP);
debug("audio output: waiting for cap requests");
/* wait for audio setup queries */
while(1)
{
int cmd;
cmd = xfermem_block(XF_READER, xf);
if(cmd == XF_CMD_AUDIOCAP)
{
ao->rate = xf->rate;
ao->channels = xf->channels;
ao->format = ao->get_formats(ao);
debug3("formats for %liHz/%ich: 0x%x", ao->rate, ao->channels, ao->format);
xf->format = ao->format;
xfermem_putcmd(my_fd, XF_CMD_AUDIOCAP);
}
else if(cmd == XF_CMD_WAKEUP)
{
debug("got wakeup... leaving config mode");
xfermem_putcmd(buffermem->fd[XF_READER], XF_CMD_WAKEUP);
break;
}
else
{
error1("unexpected command %i", cmd);
return;
}
}
/* Fill complete buffer on first run before starting to play.
* Live mp3 streams constantly approach buffer underrun otherwise. [dk]
*/
preload = (int)(param.preload*xf->size);
if(preload > xf->size) preload = xf->size;
if(preload < 0) preload = 0;
for (;;) {
if (intflag) {
debug("handle intflag... flushing");
intflag = FALSE;
ao->flush(ao);
/* Either prepare for waiting or empty buffer now. */
if(!xf->justwait) xf->readindex = xf->freeindex;
else
{
int cmd;
debug("Prepare for waiting; draining command queue. (There's a lot of wakeup commands pending, usually.)");
do
{
cmd = xfermem_getcmd(my_fd, FALSE);
/* debug1("drain: %i", cmd); */
} while(cmd > 0);
}
if(xf->wakeme[XF_WRITER]) xfermem_putcmd(my_fd, XF_CMD_WAKEUP);
}
if (usr1flag) {
debug("handling usr1flag");
usr1flag = FALSE;
/* close and re-open in order to flush
* the device's internal buffer before
* changing the sample rate. [OF]
*/
/* writer must block when sending SIGUSR1
* or we will lose all data processed
* in the meantime! [dk]
*/
xf->readindex = xf->freeindex;
/* We've nailed down the new starting location -
* writer is now safe to go on. [dk]
*/
if (xf->wakeme[XF_WRITER])
xfermem_putcmd(my_fd, XF_CMD_WAKEUP);
ao->rate = xf->rate;
ao->channels = xf->channels;
ao->format = xf->format;
if (reset_output(ao) < 0) {
error1("failed to reset audio: %s", strerror(errno));
exit(1);
}
}
if ( (bytes = xfermem_get_usedspace(xf)) < outburst ) {
/* if we got a buffer underrun we first
* fill 1/8 of the buffer before continue/start
* playing */
if (preload < xf->size>>3)
preload = xf->size>>3;
if(preload < outburst)
preload = outburst;
}
debug1("bytes: %i", bytes);
if(xf->justwait || bytes < preload) {
int cmd;
if (done && !bytes) {
break;
}
if(xf->justwait || !done) {
/* Don't spill into errno check below. */
errno = 0;
cmd = xfermem_block(XF_READER, xf);
debug1("got %i", cmd);
switch(cmd) {
/* More input pending. */
case XF_CMD_WAKEUP_INFO:
continue;
/* Yes, we know buffer is low but
* know we don't care.
*/
case XF_CMD_WAKEUP:
break; /* Proceed playing. */
case XF_CMD_ABORT: /* Immediate end, discard buffer contents. */
return; /* Cleanup happens outside of buffer_loop()*/
case XF_CMD_TERMINATE: /* Graceful end, playing stuff in buffer and then return. */
debug("going to terminate");
done = TRUE;
break;
case XF_CMD_RESYNC:
debug("ordered resync");
if (param.outmode == DECODE_AUDIO) ao->flush(ao);
xf->readindex = xf->freeindex;
if (xf->wakeme[XF_WRITER]) xfermem_putcmd(my_fd, XF_CMD_WAKEUP);
continue;
break;
case -1:
if(intflag || usr1flag) /* Got signal, handle it at top of loop... */
{
debug("buffer interrupted");
continue;
}
if(errno)
error1("Yuck! Error in buffer handling... or somewhere unexpected: %s", strerror(errno));
done = TRUE;
xf->readindex = xf->freeindex;
xfermem_putcmd(xf->fd[XF_READER], XF_CMD_TERMINATE);
break;
default:
fprintf(stderr, "\nEh!? Received unknown command 0x%x in buffer process.\n", cmd);
}
}
}
/* Hack! The writer issues XF_CMD_WAKEUP when first adjust
* audio settings. We do not want to lower the preload mark
* just yet!
*/
if (xf->justwait || !bytes)
continue;
preload = outburst; /* set preload to lower mark */
if (bytes > xf->size - xf->readindex)
bytes = xf->size - xf->readindex;
if (bytes > outburst)
bytes = outburst;
debug("write");
outbytes = flush_output(ao, (unsigned char*) xf->data + xf->readindex, bytes);
if(outbytes < bytes)
{
if(outbytes < 0) outbytes = 0;
if(!intflag && !usr1flag) {
error1("Ouch ... error while writing audio data: %s", strerror(errno));
/*
* done==TRUE tells writer process to stop
* sending data. There might be some latency
* involved when resetting readindex to
* freeindex so we might need more than one
* cycle to terminate. (The number of cycles
* should be finite unless I managed to mess
* up something. ;-) [dk]
*/
done = TRUE;
xf->readindex = xf->freeindex;
xfermem_putcmd(xf->fd[XF_READER], XF_CMD_TERMINATE);
}
else debug("buffer interrupted");
}
bytes = outbytes;
xf->readindex = (xf->readindex + bytes) % xf->size;
if (xf->wakeme[XF_WRITER])
xfermem_putcmd(my_fd, XF_CMD_WAKEUP);
}
}
#endif
/* EOF */

View file

@ -0,0 +1,45 @@
/*
buffer.h: output buffer
copyright 1999-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Daniel Kobras / Oliver Fromme
*/
/*
* Application specific interaction between main and buffer
* process. This is much less generic than the functions in
* xfermem so I chose to put it in buffer.[hc].
* 01/28/99 [dk]
*/
#ifndef _MPG123_BUFFER_H_
#define _MPG123_BUFFER_H_
#ifndef NOXFERMEM
void real_buffer_ignore_lowmem(void);
void real_buffer_end(int rude);
void real_buffer_resync(void);
void real_plain_buffer_resync(void);
void real_buffer_reset(void);
void real_buffer_start(void);
void real_buffer_stop(void);
/* Hm, that's funny preprocessor weirdness. */
#define buffer_start() (param.usebuffer ? real_buffer_start(),0 : 0)
#define buffer_stop() (param.usebuffer ? real_buffer_stop(),0 : 0)
#define buffer_reset() (param.usebuffer ? real_buffer_reset(),0 : 0)
#define buffer_resync() (param.usebuffer ? real_buffer_resync(),0 : 0)
#define plain_buffer_resync() (param.usebuffer ? real_plain_buffer_resync(),0 : 0)
#define buffer_end(a) (param.usebuffer ? real_buffer_end(a),0 : 0)
#define buffer_ignore_lowmem() (param.usebuffer ? real_buffer_ignore_lowmem(),0 : 0)
#else
#define buffer_start()
#define buffer_stop()
#define buffer_reset()
#define buffer_resync()
#define plain_buffer_resync()
#define buffer_end()
#define buffer_ignore_lowmem()
#endif
#endif

View file

@ -0,0 +1,240 @@
/*
common: misc stuff... audio flush, status display...
copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Michael Hipp
*/
#include "mpg123app.h"
#include <sys/stat.h>
#include <fcntl.h>
#include "common.h"
#include "debug.h"
const char* rva_name[3] = { "off", "mix", "album" };
static const char *modes[5] = {"Stereo", "Joint-Stereo", "Dual-Channel", "Single-Channel", "Invalid" };
static const char *smodes[5] = { "stereo", "joint-stereo", "dual-channel", "mono", "invalid" };
static const char *layers[4] = { "Unknown" , "I", "II", "III" };
static const char *versions[4] = {"1.0", "2.0", "2.5", "x.x" };
static const int samples_per_frame[4][4] =
{
{ -1,384,1152,1152 }, /* MPEG 1 */
{ -1,384,1152,576 }, /* MPEG 2 */
{ -1,384,1152,576 }, /* MPEG 2.5 */
{ -1,-1,-1,-1 }, /* Unknown */
};
#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H)
void (*catchsignal(int signum, void(*handler)()))()
{
struct sigaction new_sa;
struct sigaction old_sa;
#ifdef DONT_CATCH_SIGNALS
fprintf (stderr, "Not catching any signals.\n");
return ((void (*)()) -1);
#endif
new_sa.sa_handler = handler;
sigemptyset(&new_sa.sa_mask);
new_sa.sa_flags = 0;
if (sigaction(signum, &new_sa, &old_sa) == -1)
return ((void (*)()) -1);
return (old_sa.sa_handler);
}
#endif
/* concurring to print_rheader... here for control_generic */
const char* remote_header_help = "S <mpeg-version> <layer> <sampling freq> <mode(stereo/mono/...)> <mode_ext> <framesize> <stereo> <copyright> <error_protected> <emphasis> <bitrate> <extension> <vbr(0/1=yes/no)>";
void print_remote_header(mpg123_handle *mh)
{
struct mpg123_frameinfo i;
mpg123_info(mh, &i);
if(i.mode >= 4 || i.mode < 0) i.mode = 4;
if(i.version >= 3 || i.version < 0) i.version = 3;
generic_sendmsg("S %s %d %ld %s %d %d %d %d %d %d %d %d %d",
versions[i.version],
i.layer,
i.rate,
modes[i.mode],
i.mode_ext,
i.framesize,
i.mode == MPG123_M_MONO ? 1 : 2,
i.flags & MPG123_COPYRIGHT ? 1 : 0,
i.flags & MPG123_CRC ? 1 : 0,
i.emphasis,
i.bitrate,
i.flags & MPG123_PRIVATE ? 1 : 0,
i.vbr);
}
void print_header(mpg123_handle *mh)
{
struct mpg123_frameinfo i;
mpg123_info(mh, &i);
if(i.mode > 4 || i.mode < 0) i.mode = 4;
if(i.version > 3 || i.version < 0) i.version = 3;
if(i.layer > 3 || i.layer < 0) i.layer = 0;
fprintf(stderr,"MPEG %s, Layer: %s, Freq: %ld, mode: %s, modext: %d, BPF : %d\n",
versions[i.version],
layers[i.layer], i.rate,
modes[i.mode],i.mode_ext,i.framesize);
fprintf(stderr,"Channels: %d, copyright: %s, original: %s, CRC: %s, emphasis: %d.\n",
i.mode == MPG123_M_MONO ? 1 : 2,i.flags & MPG123_COPYRIGHT ? "Yes" : "No",
i.flags & MPG123_ORIGINAL ? "Yes" : "No", i.flags & MPG123_CRC ? "Yes" : "No",
i.emphasis);
fprintf(stderr,"Bitrate: ");
switch(i.vbr)
{
case MPG123_CBR:
if(i.bitrate) fprintf(stderr, "%d kbit/s", i.bitrate);
else fprintf(stderr, "%d kbit/s (free format)", (int)((double)(i.framesize+4)*8*i.rate*0.001/samples_per_frame[i.version][i.layer]+0.5));
break;
case MPG123_VBR: fprintf(stderr, "VBR"); break;
case MPG123_ABR: fprintf(stderr, "%d kbit/s ABR", i.abr_rate); break;
default: fprintf(stderr, "???");
}
fprintf(stderr, " Extension value: %d\n", i.flags & MPG123_PRIVATE ? 1 : 0);
}
void print_header_compact(mpg123_handle *mh)
{
struct mpg123_frameinfo i;
mpg123_info(mh, &i);
if(i.mode > 4 || i.mode < 0) i.mode = 4;
if(i.version > 3 || i.version < 0) i.version = 3;
if(i.layer > 3 || i.layer < 0) i.layer = 0;
fprintf(stderr,"MPEG %s layer %s, ", versions[i.version], layers[i.layer]);
switch(i.vbr)
{
case MPG123_CBR:
if(i.bitrate) fprintf(stderr, "%d kbit/s", i.bitrate);
else fprintf(stderr, "%d kbit/s (free format)", (int)((double)i.framesize*8*i.rate*0.001/samples_per_frame[i.version][i.layer]+0.5));
break;
case MPG123_VBR: fprintf(stderr, "VBR"); break;
case MPG123_ABR: fprintf(stderr, "%d kbit/s ABR", i.abr_rate); break;
default: fprintf(stderr, "???");
}
fprintf(stderr,", %ld Hz %s\n", i.rate, smodes[i.mode]);
}
#if 0
/* removed the strndup for better portability */
/*
* Allocate space for a new string containing the first
* "num" characters of "src". The resulting string is
* always zero-terminated. Returns NULL if malloc fails.
*/
char *strndup (const char *src, int num)
{
char *dst;
if (!(dst = (char *) malloc(num+1)))
return (NULL);
dst[num] = '\0';
return (strncpy(dst, src, num));
}
#endif
/*
* Split "path" into directory and filename components.
*
* Return value is 0 if no directory was specified (i.e.
* "path" does not contain a '/'), OR if the directory
* is the same as on the previous call to this function.
*
* Return value is 1 if a directory was specified AND it
* is different from the previous one (if any).
*/
int split_dir_file (const char *path, char **dname, char **fname)
{
static char *lastdir = NULL;
char *slashpos;
if ((slashpos = strrchr(path, '/'))) {
*fname = slashpos + 1;
*dname = strdup(path); /* , 1 + slashpos - path); */
if(!(*dname)) {
perror("failed to allocate memory for dir name");
return 0;
}
(*dname)[1 + slashpos - path] = 0;
if (lastdir && !strcmp(lastdir, *dname)) {
/*** same as previous directory ***/
free (*dname);
*dname = lastdir;
return 0;
}
else {
/*** different directory ***/
if (lastdir)
free (lastdir);
lastdir = *dname;
return 1;
}
}
else {
/*** no directory specified ***/
if (lastdir) {
free (lastdir);
lastdir = NULL;
};
*dname = NULL;
*fname = (char *)path;
return 0;
}
}
unsigned int roundui(double val)
{
double base = floor(val);
return (unsigned int) ((val-base) < 0.5 ? base : base + 1 );
}
void print_stat(mpg123_handle *fr, long offset, long buffsize)
{
double tim1,tim2;
off_t rno, no;
double basevol, realvol;
char *icy;
#ifndef WIN32
#ifndef GENERIC
/* Only generate new stat line when stderr is ready... don't overfill... */
{
struct timeval t;
fd_set serr;
int n,errfd = fileno(stderr);
t.tv_sec=t.tv_usec=0;
FD_ZERO(&serr);
FD_SET(errfd,&serr);
n = select(errfd+1,NULL,&serr,NULL,&t);
if(n <= 0) return;
}
#endif
#endif
if( MPG123_OK == mpg123_position(fr, offset, buffsize, &no, &rno, &tim1, &tim2)
&& MPG123_OK == mpg123_getvolume(fr, &basevol, &realvol, NULL) )
{
fprintf(stderr, "\rFrame# %5"OFF_P" [%5"OFF_P"], Time: %02lu:%02u.%02u [%02u:%02u.%02u], RVA:%6s, Vol: %3u(%3u)",
(off_p)no, (off_p)rno,
(unsigned long) tim1/60, (unsigned int)tim1%60, (unsigned int)(tim1*100)%100,
(unsigned int)tim2/60, (unsigned int)tim2%60, (unsigned int)(tim2*100)%100,
rva_name[param.rva], roundui(basevol*100), roundui(realvol*100) );
if(param.usebuffer) fprintf(stderr,", [%8ld] ",(long)buffsize);
}
/* Check for changed tags here too? */
if( mpg123_meta_check(fr) & MPG123_NEW_ICY && MPG123_OK == mpg123_icy(fr, &icy) )
fprintf(stderr, "\nICY-META: %s\n", icy);
}
void clear_stat()
{
fprintf(stderr, "\r \r");
}

View file

@ -0,0 +1,29 @@
/*
common: anything can happen here... frame reading, output, messages
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Michael Hipp
*/
#ifndef _MPG123_COMMON_H_
#define _MPG123_COMMON_H_
#include "mpg123app.h"
void (*catchsignal(int signum, void(*handler)()))();
void print_header(mpg123_handle *);
void print_header_compact(mpg123_handle *);
void print_stat(mpg123_handle *fr, long offset, long buffsize);
void clear_stat();
/* for control_generic */
extern const char* remote_header_help;
void print_remote_header(mpg123_handle *mh);
void generic_sendmsg (const char *fmt, ...);
int split_dir_file(const char *path, char **dname, char **fname);
extern const char* rva_name[3];
#endif

View file

@ -0,0 +1,436 @@
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It is for 32bit x86... */
#undef ABI_ALIGN_FUN
/* Define to use proper rounding. */
#undef ACCURATE_ROUNDING
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
#undef ASMALIGN_EXP
/* Define if __attribute__((aligned(16))) shall be used */
#undef CCALIGN
/* Define if debugging is enabled. */
#undef DEBUG
/* The default audio output module(s) to use */
#undef DEFAULT_OUTPUT_MODULE
/* Define if building with dynamcally linked libmpg123 */
#undef DYNAMIC_BUILD
/* Define if FIFO support is enabled. */
#undef FIFO
/* Define if frame index should be used. */
#undef FRAME_INDEX
/* Define if gapless is enabled. */
#undef GAPLESS
/* Define to 1 if you have the <alc.h> header file. */
#undef HAVE_ALC_H
/* Define to 1 if you have the <Alib.h> header file. */
#undef HAVE_ALIB_H
/* Define to 1 if you have the <AL/alc.h> header file. */
#undef HAVE_AL_ALC_H
/* Define to 1 if you have the <AL/al.h> header file. */
#undef HAVE_AL_AL_H
/* Define to 1 if you have the <al.h> header file. */
#undef HAVE_AL_H
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the <asm/audioio.h> header file. */
#undef HAVE_ASM_AUDIOIO_H
/* Define to 1 if you have the `atoll' function. */
#undef HAVE_ATOLL
/* Define to 1 if you have the <audios.h> header file. */
#undef HAVE_AUDIOS_H
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
#undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
#undef HAVE_AUDIOUNIT_AUDIOUNIT_H
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
#undef HAVE_CORESERVICES_CORESERVICES_H
/* Define to 1 if you have the <CUlib.h> header file. */
#undef HAVE_CULIB_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */
#undef HAVE_GAI_ADDRCONFIG
/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the `mx' library (-lmx). */
#undef HAVE_LIBMX
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#undef HAVE_LINUX_SOUNDCARD_H
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if libltdl is available */
#undef HAVE_LTDL
/* Define to 1 if you have the <machine/soundcard.h> header file. */
#undef HAVE_MACHINE_SOUNDCARD_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mkfifo' function. */
#undef HAVE_MKFIFO
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H
/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
/* Define to 1 if you have the <OpenAL/alc.h> header file. */
#undef HAVE_OPENAL_ALC_H
/* Define to 1 if you have the <OpenAL/al.h> header file. */
#undef HAVE_OPENAL_AL_H
/* Define to 1 if you have the <os2me.h> header file. */
#undef HAVE_OS2ME_H
/* Define to 1 if you have the <os2.h> header file. */
#undef HAVE_OS2_H
/* Define to 1 if you have the `random' function. */
#undef HAVE_RANDOM
/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
/* Define to 1 if you have the `sched_setscheduler' function. */
#undef HAVE_SCHED_SETSCHEDULER
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if you have the `setpriority' function. */
#undef HAVE_SETPRIORITY
/* Define to 1 if you have the `setuid' function. */
#undef HAVE_SETUID
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the <sndio.h> header file. */
#undef HAVE_SNDIO_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sun/audioio.h> header file. */
#undef HAVE_SUN_AUDIOIO_H
/* Define to 1 if you have the <sys/audioio.h> header file. */
#undef HAVE_SYS_AUDIOIO_H
/* Define to 1 if you have the <sys/audio.h> header file. */
#undef HAVE_SYS_AUDIO_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define to 1 if you have the <sys/signal.h> header file. */
#undef HAVE_SYS_SIGNAL_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define this if you have the POSIX termios library */
#undef HAVE_TERMIOS
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#undef HAVE_WS2TCPIP_H
/* Define to indicate that float storage follows IEEE754. */
#undef IEEE_FLOAT
/* size of the frame index seek table */
#undef INDEX_SIZE
/* Define if IPV6 support is enabled. */
#undef IPV6
/* Define this to the size of long type in bits, used for LFS small/native
alias functions. */
#undef LFS_ALIAS_BITS
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* The suffix for module files. */
#undef MODULE_FILE_SUFFIX
/* Define if network support is enabled. */
#undef NETWORK
/* Define to disable 16 bit integer output. */
#undef NO_16BIT
/* Define to disable 32 bit and 24 bit integer output. */
#undef NO_32BIT
/* Define to disable 8 bit integer output. */
#undef NO_8BIT
/* Define to disable downsampled decoding. */
#undef NO_DOWNSAMPLE
/* Define to disable error messages in combination with a return value (the
return is left intact). */
#undef NO_ERETURN
/* Define to disable error messages. */
#undef NO_ERRORMSG
/* Define to disable feeder and buffered readers. */
#undef NO_FEEDER
/* Define to disable ICY handling. */
#undef NO_ICY
/* Define to disable ID3v2 parsing. */
#undef NO_ID3V2
/* Define to disable layer I. */
#undef NO_LAYER1
/* Define to disable layer II. */
#undef NO_LAYER2
/* Define to disable layer III. */
#undef NO_LAYER3
/* Define to disable ntom resampling. */
#undef NO_NTOM
/* Define to disable real output. */
#undef NO_REAL
/* Define to disable string functions. */
#undef NO_STRING
/* Define to disable warning messages. */
#undef NO_WARNING
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define if portaudio v18 API is wanted. */
#undef PORTAUDIO18
/* The size of `int32_t', as computed by sizeof. */
#undef SIZEOF_INT32_T
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `off_t', as computed by sizeof. */
#undef SIZEOF_OFF_T
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of `ssize_t', as computed by sizeof. */
#undef SIZEOF_SSIZE_T
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if modules are enabled */
#undef USE_MODULES
/* Version number of package */
#undef VERSION
/* Define to use Win32 named pipes */
#undef WANT_WIN32_FIFO
/* Define to use Win32 sockets */
#undef WANT_WIN32_SOCKETS
/* Define to use Unicode for Windows */
#undef WANT_WIN32_UNICODE
/* WinXP and above for ipv6 */
#undef WINVER
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* WinXP and above for ipv6 */
#undef _WIN32_WINNT
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to `short' if <sys/types.h> does not define. */
#undef int16_t
/* Define to `int' if <sys/types.h> does not define. */
#undef int32_t
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned long' if <sys/types.h> does not define. */
#undef size_t
/* Define to `long' if <sys/types.h> does not define. */
#undef ssize_t
/* Define to `unsigned short' if <sys/types.h> does not define. */
#undef uint16_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef uint32_t
/* Define to `unsigned long' if <sys/types.h> does not define. */
#undef uintptr_t

View file

@ -0,0 +1,809 @@
/*
control_generic.c: control interface for frontends and real console warriors
copyright 1997-99,2004-8 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Andreas Neuhaus and Michael Hipp
reworked by Thomas Orgis - it was the entry point for eventually becoming maintainer...
*/
#include "mpg123app.h"
#include <stdarg.h>
#include <ctype.h>
#if !defined (WIN32) || defined (__CYGWIN__)
#include <sys/wait.h>
#include <sys/socket.h>
#endif
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include "common.h"
#include "buffer.h"
#include "genre.h"
#include "playlist.h"
#define MODE_STOPPED 0
#define MODE_PLAYING 1
#define MODE_PAUSED 2
extern int buffer_pid;
extern audio_output_t *ao;
#ifdef FIFO
#include <sys/stat.h>
int control_file = STDIN_FILENO;
#else
#define control_file STDIN_FILENO
#ifdef WANT_WIN32_FIFO
#error Control interface does not work on win32 stdin
#endif /* WANT_WIN32_FIFO */
#endif
FILE *outstream;
static int mode = MODE_STOPPED;
static int init = 0;
#include "debug.h"
void generic_sendmsg (const char *fmt, ...)
{
va_list ap;
fprintf(outstream, "@");
va_start(ap, fmt);
vfprintf(outstream, fmt, ap);
va_end(ap);
fprintf(outstream, "\n");
}
/* Split up a number of lines separated by \n, \r, both or just zero byte
and print out each line with specified prefix. */
static void generic_send_lines(const char* fmt, mpg123_string *inlines)
{
size_t i;
int hadcr = 0, hadlf = 0;
char *lines = NULL;
char *line = NULL;
size_t len = 0;
if(inlines != NULL && inlines->fill)
{
lines = inlines->p;
len = inlines->fill;
}
else return;
line = lines;
for(i=0; i<len; ++i)
{
if(lines[i] == '\n' || lines[i] == '\r' || lines[i] == 0)
{
char save = lines[i]; /* saving, changing, restoring a byte in the data */
if(save == '\n') ++hadlf;
if(save == '\r') ++hadcr;
if((hadcr || hadlf) && hadlf % 2 == 0 && hadcr % 2 == 0) line = "";
if(line)
{
lines[i] = 0;
generic_sendmsg(fmt, line);
line = NULL;
lines[i] = save;
}
}
else
{
hadlf = hadcr = 0;
if(line == NULL) line = lines+i;
}
}
}
void generic_sendstat (mpg123_handle *fr)
{
off_t current_frame, frames_left;
double current_seconds, seconds_left;
if(!mpg123_position(fr, 0, xfermem_get_usedspace(buffermem), &current_frame, &frames_left, &current_seconds, &seconds_left))
generic_sendmsg("F %"OFF_P" %"OFF_P" %3.2f %3.2f", (off_p)current_frame, (off_p)frames_left, current_seconds, seconds_left);
}
static void generic_sendv1(mpg123_id3v1 *v1, const char *prefix)
{
int i;
char info[125] = "";
memcpy(info, v1->title, 30);
memcpy(info+30, v1->artist, 30);
memcpy(info+60, v1->album, 30);
memcpy(info+90, v1->year, 4);
memcpy(info+94, v1->comment, 30);
for(i=0;i<124; ++i) if(info[i] == 0) info[i] = ' ';
info[i] = 0;
generic_sendmsg("%s ID3:%s%s", prefix, info, (v1->genre<=genre_count) ? genre_table[v1->genre] : "Unknown");
generic_sendmsg("%s ID3.genre:%i", prefix, v1->genre);
if(v1->comment[28] == 0 && v1->comment[29] != 0)
generic_sendmsg("%s ID3.track:%i", prefix, (unsigned char)v1->comment[29]);
}
static void generic_sendinfoid3(mpg123_handle *mh)
{
mpg123_id3v1 *v1;
mpg123_id3v2 *v2;
if(MPG123_OK != mpg123_id3(mh, &v1, &v2))
{
error1("Cannot get ID3 data: %s", mpg123_strerror(mh));
return;
}
if(v1 != NULL)
{
generic_sendv1(v1, "I");
}
if(v2 != NULL)
{
generic_send_lines("I ID3v2.title:%s", v2->title);
generic_send_lines("I ID3v2.artist:%s", v2->artist);
generic_send_lines("I ID3v2.album:%s", v2->album);
generic_send_lines("I ID3v2.year:%s", v2->year);
generic_send_lines("I ID3v2.comment:%s", v2->comment);
generic_send_lines("I ID3v2.genre:%s", v2->genre);
}
}
void generic_sendalltag(mpg123_handle *mh)
{
mpg123_id3v1 *v1;
mpg123_id3v2 *v2;
generic_sendmsg("T {");
if(MPG123_OK != mpg123_id3(mh, &v1, &v2))
{
error1("Cannot get ID3 data: %s", mpg123_strerror(mh));
v2 = NULL;
v1 = NULL;
}
if(v1 != NULL) generic_sendv1(v1, "T");
if(v2 != NULL)
{
size_t i;
for(i=0; i<v2->texts; ++i)
{
char id[5];
memcpy(id, v2->text[i].id, 4);
id[4] = 0;
generic_sendmsg("T ID3v2.%s:", id);
generic_send_lines("T =%s", &v2->text[i].text);
}
for(i=0; i<v2->extras; ++i)
{
char id[5];
memcpy(id, v2->extra[i].id, 4);
id[4] = 0;
generic_sendmsg("T ID3v2.%s desc(%s):",
id,
v2->extra[i].description.fill ? v2->extra[i].description.p : "" );
generic_send_lines("T =%s", &v2->extra[i].text);
}
for(i=0; i<v2->comments; ++i)
{
char id[5];
char lang[4];
memcpy(id, v2->comment_list[i].id, 4);
id[4] = 0;
memcpy(lang, v2->comment_list[i].lang, 3);
lang[3] = 0;
generic_sendmsg("T ID3v2.%s lang(%s) desc(%s):",
id, lang,
v2->comment_list[i].description.fill ? v2->comment_list[i].description.p : "");
generic_send_lines("T =%s", &v2->comment_list[i].text);
}
}
generic_sendmsg("T }");
}
void generic_sendinfo (char *filename)
{
char *s, *t;
s = strrchr(filename, '/');
if (!s)
s = filename;
else
s++;
t = strrchr(s, '.');
if (t)
*t = 0;
generic_sendmsg("I %s", s);
}
static void generic_load(mpg123_handle *fr, char *arg, int state)
{
if(param.usebuffer)
{
buffer_resync();
if(mode == MODE_PAUSED && state != MODE_PAUSED) buffer_start();
}
if(mode != MODE_STOPPED)
{
close_track();
mode = MODE_STOPPED;
}
if(!open_track(arg))
{
generic_sendmsg("E Error opening stream: %s", arg);
generic_sendmsg("P 0");
return;
}
mpg123_seek(fr, 0, SEEK_SET); /* This finds ID3v2 at beginning. */
if(mpg123_meta_check(fr) & MPG123_NEW_ID3)
{
generic_sendinfoid3(fr);
mpg123_meta_free(fr);
}
else generic_sendinfo(arg);
if(htd.icy_name.fill) generic_sendmsg("I ICY-NAME: %s", htd.icy_name.p);
if(htd.icy_url.fill) generic_sendmsg("I ICY-URL: %s", htd.icy_url.p);
mode = state;
init = 1;
generic_sendmsg(mode == MODE_PAUSED ? "P 1" : "P 2");
}
static void generic_loadlist(mpg123_handle *fr, char *arg)
{
/* arguments are two: first the index to play, then the URL */
long entry;
long i = 0;
char *file = NULL;
char *thefile = NULL;
/* I feel retarted with string parsing outside Perl. */
while(*arg && isspace(*arg)) ++arg;
entry = atol(arg);
while(*arg && !isspace(*arg)) ++arg;
while(*arg && isspace(*arg)) ++arg;
if(!*arg)
{
generic_sendmsg("E empty list name");
return;
}
/* Now got the plain playlist path in arg. On to evil manupulation of mpg123's playlist code. */
param.listname = arg;
param.listentry = 0; /* The playlist shall not filter. */
prepare_playlist(0, NULL);
while((file = get_next_file()))
{
++i;
/* semantics: 0 brings you to the last track */
if(entry == 0 || entry == i) thefile = file;
generic_sendmsg("I LISTENTRY %li: %s", i, file);
}
if(!i) generic_sendmsg("I LIST EMPTY");
/* If we have something to play, play it. */
if(thefile) generic_load(fr, thefile, MODE_PLAYING);
free_playlist(); /* Free memory after it is not needed anymore. */
}
int control_generic (mpg123_handle *fr)
{
struct timeval tv;
fd_set fds;
int n;
/* ThOr */
char alive = 1;
char silent = 0;
/* responses to stderr for frontends needing audio data from stdout */
if (param.remote_err)
outstream = stderr;
else
outstream = stdout;
#ifndef WIN32
setlinebuf(outstream);
#else /* perhaps just use setvbuf as it's C89 */
/*
fprintf(outstream, "You are on Win32 and want to use the control interface... tough luck: We need a replacement for select on STDIN first.\n");
return 0;
setvbuf(outstream, (char*)NULL, _IOLBF, 0);
*/
#endif
/* the command behaviour is different, so is the ID */
/* now also with version for command availability */
fprintf(outstream, "@R MPG123 (ThOr) v7\n");
#ifdef FIFO
if(param.fifo)
{
if(param.fifo[0] == 0)
{
error("You wanted an empty FIFO name??");
return 1;
}
#ifndef WANT_WIN32_FIFO
unlink(param.fifo);
if(mkfifo(param.fifo, 0666) == -1)
{
error2("Failed to create FIFO at %s (%s)", param.fifo, strerror(errno));
return 1;
}
debug("going to open named pipe ... blocking until someone gives command");
#endif /* WANT_WIN32_FIFO */
#ifdef WANT_WIN32_FIFO
control_file = win32_fifo_mkfifo(param.fifo);
#else
control_file = open(param.fifo,O_RDONLY);
#endif /* WANT_WIN32_FIFO */
debug("opened");
}
#endif
while (alive)
{
tv.tv_sec = 0;
tv.tv_usec = 0;
FD_ZERO(&fds);
FD_SET(control_file, &fds);
/* play frame if no command needs to be processed */
if (mode == MODE_PLAYING) {
#ifdef WANT_WIN32_FIFO
n = win32_fifo_read_peek(&tv);
#else
n = select(32, &fds, NULL, NULL, &tv);
#endif
if (n == 0) {
if (!play_frame())
{
/* When the track ended, user may want to keep it open (to seek back),
so there is a decision between stopping and pausing at the end. */
if(param.keep_open)
{
mode = MODE_PAUSED;
/* Hm, buffer should be stopped already, shouldn't it? */
if(param.usebuffer) buffer_stop();
generic_sendmsg("P 1");
}
else
{
mode = MODE_STOPPED;
close_track();
generic_sendmsg("P 0");
}
continue;
}
if (init) {
print_remote_header(fr);
init = 0;
}
if(silent == 0)
{
generic_sendstat(fr);
if(mpg123_meta_check(fr) & MPG123_NEW_ICY)
{
char *meta;
if(mpg123_icy(fr, &meta) == MPG123_OK)
generic_sendmsg("I ICY-META: %s", meta != NULL ? meta : "<nil>");
}
}
}
}
else {
/* wait for command */
while (1) {
#ifdef WANT_WIN32_FIFO
n = win32_fifo_read_peek(NULL);
#else
n = select(32, &fds, NULL, NULL, NULL);
#endif
if (n > 0)
break;
}
}
/* on error */
if (n < 0) {
fprintf(stderr, "Error waiting for command: %s\n", strerror(errno));
return 1;
}
/* read & process commands */
if (n > 0)
{
short int len = 1; /* length of buffer */
char *cmd, *arg; /* variables for parsing, */
char *comstr = NULL; /* gcc thinks that this could be used uninitialited... */
char buf[REMOTE_BUFFER_SIZE];
short int counter;
char *next_comstr = buf; /* have it initialized for first command */
/* read as much as possible, maybe multiple commands */
/* When there is nothing to read (EOF) or even an error, it is the end */
#ifdef WANT_WIN32_FIFO
len = win32_fifo_read(buf,REMOTE_BUFFER_SIZE);
#else
len = read(control_file, buf, REMOTE_BUFFER_SIZE);
#endif
if(len < 1)
{
#ifdef FIFO
if(len == 0 && param.fifo)
{
debug("fifo ended... reopening");
#ifdef WANT_WIN32_FIFO
win32_fifo_mkfifo(param.fifo);
#else
close(control_file);
control_file = open(param.fifo,O_RDONLY|O_NONBLOCK);
#endif
if(control_file < 0){ error1("open of fifo failed... %s", strerror(errno)); break; }
continue;
}
#endif
if(len < 0) error1("command read error: %s", strerror(errno));
break;
}
debug1("read %i bytes of commands", len);
/* one command on a line - separation by \n -> C strings in a row */
for(counter = 0; counter < len; ++counter)
{
/* line end is command end */
if( (buf[counter] == '\n') || (buf[counter] == '\r') )
{
debug1("line end at counter=%i", counter);
buf[counter] = 0; /* now it's a properly ending C string */
comstr = next_comstr;
/* skip the additional line ender of \r\n or \n\r */
if( (counter < (len - 1)) && ((buf[counter+1] == '\n') || (buf[counter+1] == '\r')) ) buf[++counter] = 0;
/* next "real" char is first of next command */
next_comstr = buf + counter+1;
/* directly process the command now */
debug1("interpreting command: %s", comstr);
if(strlen(comstr) == 0) continue;
/* PAUSE */
if (!strcasecmp(comstr, "P") || !strcasecmp(comstr, "PAUSE")) {
if(mode != MODE_STOPPED)
{
if (mode == MODE_PLAYING) {
mode = MODE_PAUSED;
if(param.usebuffer) buffer_stop();
generic_sendmsg("P 1");
} else {
mode = MODE_PLAYING;
if(param.usebuffer) buffer_start();
generic_sendmsg("P 2");
}
} else generic_sendmsg("P 0");
continue;
}
/* STOP */
if (!strcasecmp(comstr, "S") || !strcasecmp(comstr, "STOP")) {
if (mode != MODE_STOPPED) {
if(param.usebuffer)
{
buffer_stop();
buffer_resync();
}
close_track();
mode = MODE_STOPPED;
generic_sendmsg("P 0");
} else generic_sendmsg("P 0");
continue;
}
/* SILENCE */
if(!strcasecmp(comstr, "SILENCE")) {
silent = 1;
generic_sendmsg("silence");
continue;
}
if(!strcasecmp(comstr, "T") || !strcasecmp(comstr, "TAG")) {
generic_sendalltag(fr);
continue;
}
if(!strcasecmp(comstr, "SCAN"))
{
if(mode != MODE_STOPPED)
{
if(mpg123_scan(fr) == MPG123_OK)
generic_sendmsg("SCAN done");
else
generic_sendmsg("E %s", mpg123_strerror(fr));
}
else generic_sendmsg("E No track loaded!");
continue;
}
if(!strcasecmp(comstr, "SAMPLE"))
{
off_t pos = mpg123_tell(fr);
off_t len = mpg123_length(fr);
/* I need to have portable printf specifiers that do not truncate the type... more autoconf... */
if(len < 0) generic_sendmsg("E %s", mpg123_strerror(fr));
else generic_sendmsg("SAMPLE %li %li", (long)pos, (long)len);
continue;
}
if(!strcasecmp(comstr, "SHOWEQ"))
{
int i;
generic_sendmsg("SHOWEQ {");
for(i=0; i<32; ++i)
{
generic_sendmsg("SHOWEQ %i : %i : %f", MPG123_LEFT, i, mpg123_geteq(fr, MPG123_LEFT, i));
generic_sendmsg("SHOWEQ %i : %i : %f", MPG123_RIGHT, i, mpg123_geteq(fr, MPG123_RIGHT, i));
}
generic_sendmsg("SHOWEQ }");
continue;
}
if(!strcasecmp(comstr, "STATE"))
{
long val;
generic_sendmsg("STATE {");
/* Get some state information bits and display them. */
if(mpg123_getstate(fr, MPG123_ACCURATE, &val, NULL) == MPG123_OK)
generic_sendmsg("STATE accurate %li", val);
generic_sendmsg("STATE }");
continue;
}
/* QUIT */
if (!strcasecmp(comstr, "Q") || !strcasecmp(comstr, "QUIT")){
alive = FALSE; continue;
}
/* some HELP */
if (!strcasecmp(comstr, "H") || !strcasecmp(comstr, "HELP")) {
generic_sendmsg("H {");
generic_sendmsg("H HELP/H: command listing (LONG/SHORT forms), command case insensitve");
generic_sendmsg("H LOAD/L <trackname>: load and start playing resource <trackname>");
generic_sendmsg("H LOADPAUSED/LP <trackname>: load but do not start playing resource <trackname>");
generic_sendmsg("H LOADLIST <entry> <url>: load a playlist from given <url>, and display its entries, optionally load and play one of these specificed by the integer <entry> (<0: just list, 0: play last track, >0:play track with that position in list)");
generic_sendmsg("H PAUSE/P: pause playback");
generic_sendmsg("H STOP/S: stop playback (closes file)");
generic_sendmsg("H JUMP/J <frame>|<+offset>|<-offset>|<[+|-]seconds>s: jump to mpeg frame <frame> or change position by offset, same in seconds if number followed by \"s\"");
generic_sendmsg("H VOLUME/V <percent>: set volume in % (0..100...); float value");
generic_sendmsg("H RVA off|(mix|radio)|(album|audiophile): set rva mode");
generic_sendmsg("H EQ/E <channel> <band> <value>: set equalizer value for frequency band 0 to 31 on channel %i (left) or %i (right) or %i (both)", MPG123_LEFT, MPG123_RIGHT, MPG123_LR);
generic_sendmsg("H EQFILE <filename>: load EQ settings from a file");
generic_sendmsg("H SHOWEQ: show all equalizer settings (as <channel> <band> <value> lines in a SHOWEQ block (like TAG))");
generic_sendmsg("H SEEK/K <sample>|<+offset>|<-offset>: jump to output sample position <samples> or change position by offset");
generic_sendmsg("H SCAN: scan through the file, building seek index");
generic_sendmsg("H SAMPLE: print out the sample position and total number of samples");
generic_sendmsg("H SEQ <bass> <mid> <treble>: simple eq setting...");
generic_sendmsg("H PITCH <[+|-]value>: adjust playback speed (+0.01 is 1 %% faster)");
generic_sendmsg("H SILENCE: be silent during playback (meaning silence in text form)");
generic_sendmsg("H STATE: Print auxiliary state info in several lines (just try it to see what info is there).");
generic_sendmsg("H TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names.");
generic_sendmsg("H The output is multiple lines, begin marked by \"@T {\", end by \"@T }\".");
generic_sendmsg("H ID3v1 data is like in the @I info lines (see below), just with \"@T\" in front.");
generic_sendmsg("H An ID3v2 data field is introduced via ([ ... ] means optional):");
generic_sendmsg("H @T ID3v2.<NAME>[ [lang(<LANG>)] desc(<description>)]:");
generic_sendmsg("H The lines of data follow with \"=\" prefixed:");
generic_sendmsg("H @T =<one line of content in UTF-8 encoding>");
generic_sendmsg("H meaning of the @S stream info:");
generic_sendmsg("H %s", remote_header_help);
generic_sendmsg("H The @I lines after loading a track give some ID3 info, the format:");
generic_sendmsg("H @I ID3:artist album year comment genretext");
generic_sendmsg("H where artist,album and comment are exactly 30 characters each, year is 4 characters, genre text unspecified.");
generic_sendmsg("H You will encounter \"@I ID3.genre:<number>\" and \"@I ID3.track:<number>\".");
generic_sendmsg("H Then, there is an excerpt of ID3v2 info in the structure");
generic_sendmsg("H @I ID3v2.title:Blabla bla Bla");
generic_sendmsg("H for every line of the \"title\" data field. Likewise for other fields (author, album, etc).");
generic_sendmsg("H }");
continue;
}
/* commands with arguments */
cmd = NULL;
arg = NULL;
cmd = strtok(comstr," \t"); /* get the main command */
arg = strtok(NULL,""); /* get the args */
if (cmd && strlen(cmd) && arg && strlen(arg))
{
/* Simple EQ: SEQ <BASS> <MID> <TREBLE> */
if (!strcasecmp(cmd, "SEQ")) {
double b,m,t;
int cn;
if(sscanf(arg, "%lf %lf %lf", &b, &m, &t) == 3)
{
/* Consider adding mpg123_seq()... but also, on could define a nicer courve for that. */
if ((t >= 0) && (t <= 3))
for(cn=0; cn < 1; ++cn) mpg123_eq(fr, MPG123_LEFT|MPG123_RIGHT, cn, b);
if ((m >= 0) && (m <= 3))
for(cn=1; cn < 2; ++cn) mpg123_eq(fr, MPG123_LEFT|MPG123_RIGHT, cn, m);
if ((b >= 0) && (b <= 3))
for(cn=2; cn < 32; ++cn) mpg123_eq(fr, MPG123_LEFT|MPG123_RIGHT, cn, t);
generic_sendmsg("bass: %f mid: %f treble: %f", b, m, t);
}
else generic_sendmsg("E invalid arguments for SEQ: %s", arg);
continue;
}
/* Equalizer control :) (JMG) */
if (!strcasecmp(cmd, "E") || !strcasecmp(cmd, "EQ")) {
double e; /* ThOr: equalizer is of type real... whatever that is */
int c, v;
/*generic_sendmsg("%s",updown);*/
if(sscanf(arg, "%i %i %lf", &c, &v, &e) == 3)
{
if(mpg123_eq(fr, c, v, e) == MPG123_OK)
generic_sendmsg("%i : %i : %f", c, v, e);
else
generic_sendmsg("E failed to set eq: %s", mpg123_strerror(fr));
}
else generic_sendmsg("E invalid arguments for EQ: %s", arg);
continue;
}
if(!strcasecmp(cmd, "EQFILE"))
{
equalfile = arg;
if(load_equalizer(fr) == 0)
generic_sendmsg("EQFILE done");
else
generic_sendmsg("E failed to parse given eq file");
continue;
}
/* SEEK to a sample offset */
if(!strcasecmp(cmd, "K") || !strcasecmp(cmd, "SEEK"))
{
off_t soff;
char *spos = arg;
int whence = SEEK_SET;
if(mode == MODE_STOPPED)
{
generic_sendmsg("E No track loaded!");
continue;
}
soff = (off_t) atobigint(spos);
if(spos[0] == '-' || spos[0] == '+') whence = SEEK_CUR;
if(0 > (soff = mpg123_seek(fr, soff, whence)))
{
generic_sendmsg("E Error while seeking: %s", mpg123_strerror(fr));
mpg123_seek(fr, 0, SEEK_SET);
}
if(param.usebuffer) buffer_resync();
generic_sendmsg("K %li", (long)mpg123_tell(fr));
continue;
}
/* JUMP */
if (!strcasecmp(cmd, "J") || !strcasecmp(cmd, "JUMP")) {
char *spos;
off_t offset;
double secs;
spos = arg;
if(mode == MODE_STOPPED)
{
generic_sendmsg("E No track loaded!");
continue;
}
if(spos[strlen(spos)-1] == 's' && sscanf(arg, "%lf", &secs) == 1) offset = mpg123_timeframe(fr, secs);
else offset = atol(spos);
/* totally replaced that stuff - it never fully worked
a bit usure about why +pos -> spos+1 earlier... */
if (spos[0] == '-' || spos[0] == '+') offset += framenum;
if(0 > (framenum = mpg123_seek_frame(fr, offset, SEEK_SET)))
{
generic_sendmsg("E Error while seeking");
mpg123_seek_frame(fr, 0, SEEK_SET);
}
if(param.usebuffer) buffer_resync();
generic_sendmsg("J %d", framenum);
continue;
}
/* VOLUME in percent */
if(!strcasecmp(cmd, "V") || !strcasecmp(cmd, "VOLUME"))
{
double v;
mpg123_volume(fr, atof(arg)/100);
mpg123_getvolume(fr, &v, NULL, NULL); /* Necessary? */
generic_sendmsg("V %f%%", v * 100);
continue;
}
/* PITCH (playback speed) in percent */
if(!strcasecmp(cmd, "PITCH"))
{
double p;
if(sscanf(arg, "%lf", &p) == 1)
{
set_pitch(fr, ao, p);
generic_sendmsg("PITCH %f", param.pitch);
}
else generic_sendmsg("E invalid arguments for PITCH: %s", arg);
continue;
}
/* RVA mode */
if(!strcasecmp(cmd, "RVA"))
{
if(!strcasecmp(arg, "off")) param.rva = MPG123_RVA_OFF;
else if(!strcasecmp(arg, "mix") || !strcasecmp(arg, "radio")) param.rva = MPG123_RVA_MIX;
else if(!strcasecmp(arg, "album") || !strcasecmp(arg, "audiophile")) param.rva = MPG123_RVA_ALBUM;
mpg123_volume_change(fr, 0.);
generic_sendmsg("RVA %s", rva_name[param.rva]);
continue;
}
/* LOAD - actually play */
if (!strcasecmp(cmd, "L") || !strcasecmp(cmd, "LOAD")){ generic_load(fr, arg, MODE_PLAYING); continue; }
if (!strcasecmp(cmd, "L") || !strcasecmp(cmd, "LOADLIST")){ generic_loadlist(fr, arg); continue; }
/* LOADPAUSED */
if (!strcasecmp(cmd, "LP") || !strcasecmp(cmd, "LOADPAUSED")){ generic_load(fr, arg, MODE_PAUSED); continue; }
/* no command matched */
generic_sendmsg("E Unknown command: %s", cmd); /* unknown command */
} /* end commands with arguments */
else generic_sendmsg("E Unknown command or no arguments: %s", comstr); /* unknown command */
} /* end of single command processing */
} /* end of scanning the command buffer */
/*
when last command had no \n... should I discard it?
Ideally, I should remember the part and wait for next
read() to get the rest up to a \n. But that can go
to infinity. Too long commands too quickly are just
bad. Cannot/Won't change that. So, discard the unfinished
command and have fingers crossed that the rest of this
unfinished one qualifies as "unknown".
*/
if(buf[len-1] != 0)
{
char lasti = buf[len-1];
buf[len-1] = 0;
generic_sendmsg("E Unfinished command: %s%c", comstr, lasti);
}
} /* end command reading & processing */
} /* end main (alive) loop */
debug("going to end");
/* quit gracefully */
#ifndef NOXFERMEM
if (param.usebuffer) {
kill(buffer_pid, SIGINT);
xfermem_done_writer(buffermem);
waitpid(buffer_pid, NULL, 0);
xfermem_done(buffermem);
}
#endif
debug("closing control");
#ifdef FIFO
#if WANT_WIN32_FIFO
win32_fifo_close();
#else
close(control_file); /* be it FIFO or STDIN */
if(param.fifo) unlink(param.fifo);
#endif /* WANT_WIN32_FIFO */
#endif
debug("control_generic returning");
return 0;
}
/* EOF */

View file

@ -0,0 +1,48 @@
/*
equalizer: code for loading equalizer settings
copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Michael Hipp (exported to this file by Thomas Orgis)
*/
#include "mpg123app.h"
/* Load the settings from the path in the global variable equalfile.
If there is no file, restore equalizer defaults. */
int load_equalizer(mpg123_handle *mh)
{
if(equalfile != NULL)
{ /* tst; ThOr: not TRUE or FALSE: allocated or not... */
FILE *fe;
int i;
fe = fopen(equalfile,"r");
if(fe) {
char line[256];
for(i=0;i<32;i++) {
float e0 = 1.0;
float e1 = 1.0; /* %f -> float! */
do /* ignore comments */
{
line[0]=0;
fgets(line,255,fe);
}
while(line[0]=='#');
/* Hm, why not use fscanf? Comments... */
sscanf(line,"%f %f",&e0,&e1);
/* If scanning failed, we have default 1.0 value. */
mpg123_eq(mh, MPG123_LEFT, i, e0);
mpg123_eq(mh, MPG123_RIGHT, i, e1);
}
fclose(fe);
}
else
{
fprintf(stderr,"Can't open equalizer file '%s'\n",equalfile);
return -1;
}
}
else mpg123_reset_eq(mh);
return 0;
}

View file

@ -0,0 +1,271 @@
/*
genre: id3 genre definition
copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Shane Wegner
*/
char *genre_table[] =
{
"Blues",
"Classic Rock",
"Country",
"Dance",
"Disco",
"Funk",
"Grunge",
"Hip-Hop",
"Jazz",
"Metal",
"New Age",
"Oldies",
"Other",
"Pop",
"R&B",
"Rap",
"Reggae",
"Rock",
"Techno",
"Industrial",
"Alternative",
"Ska",
"Death Metal",
"Pranks",
"Soundtrack",
"Euro-Techno",
"Ambient",
"Trip-Hop",
"Vocal",
"Jazz+Funk",
"Fusion",
"Trance",
"Classical",
"Instrumental",
"Acid",
"House",
"Game",
"Sound Clip",
"Gospel",
"Noise",
"AlternRock",
"Bass",
"Soul",
"Punk",
"Space",
"Meditative",
"Instrumental Pop",
"Instrumental Rock",
"Ethnic",
"Gothic",
"Darkwave",
"Techno-Industrial",
"Electronic",
"Pop-Folk",
"Eurodance",
"Dream",
"Southern Rock",
"Comedy",
"Cult",
"Gangsta",
"Top 40",
"Christian Rap",
"Pop/Funk",
"Jungle",
"Native American",
"Cabaret",
"New Wave",
"Psychedelic",
"Rave",
"Showtunes",
"Trailer",
"Lo-Fi",
"Tribal",
"Acid Punk",
"Acid Jazz",
"Polka",
"Retro",
"Musical",
"Rock & Roll",
"Hard Rock",
"Folk",
"Folk/Rock",
"National folk",
"Swing",
"Fast-fusion",
"Bebob",
"Latin",
"Revival",
"Celtic",
"Bluegrass",
"Avantgarde",
"Gothic Rock",
"Progressive Rock",
"Psychedelic Rock",
"Symphonic Rock",
"Slow Rock",
"Big Band",
"Chorus",
"Easy Listening",
"Acoustic",
"Humour",
"Speech",
"Chanson",
"Opera",
"Chamber Music",
"Sonata",
"Symphony",
"Booty Bass",
"Primus",
"Porn Groove",
"Satire",
"Slow Jam",
"Club",
"Tango",
"Samba",
"Folklore",
"Ballad",
"Powder Ballad",
"Rhythmic Soul",
"Freestyle",
"Duet",
"Punk Rock",
"Drum Solo",
"A Capella",
"Euro-House",
"Dance Hall",
"Goa",
"Drum & Bass",
"Club House",
"Hardcore",
"Terror",
"Indie",
"BritPop",
"NegerPunk",
"Polsk Punk",
"Beat",
"Christian Gangsta",
"Heavy Metal",
"Black Metal",
"Crossover",
"Contemporary C",
"Christian Rock",
"Merengue",
"Salsa",
"Thrash Metal",
"Anime",
"JPop",
"SynthPop"
/* ,
"Unknown",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
*/
};
const int genre_count = ((int)(sizeof(genre_table)/sizeof(char*))-1);

View file

@ -0,0 +1,15 @@
/*
genre: id3 genre definition
copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Shane Wegner
*/
#ifndef _MPG123_GENRE_H_
#define _MPG123_GENRE_H_
extern char *genre_table[];
extern const int genre_count;
#endif

View file

@ -0,0 +1,148 @@
/*
getlopt: command line option/parameter parsing
copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written Oliver Fromme
old timestamp: Tue Apr 8 07:15:13 MET DST 1997
*/
#include <stdio.h>
#include "config.h"
#include "getlopt.h"
#include "compat.h"
#include "debug.h"
int loptind = 1; /* index in argv[] */
int loptchr = 0; /* index in argv[loptind] */
char *loptarg; /* points to argument if present, else to option */
topt *findopt (int islong, char *opt, topt *opts)
{
if (!opts)
return (0);
while (opts->lname) {
if (islong) {
if (!strcmp(opts->lname, opt))
return (opts);
}
else
if (opts->sname == *opt)
return (opts);
opts++;
}
return (0);
}
int performoption (int argc, char *argv[], topt *opt)
{
int result = GLO_CONTINUE;
/* this really is not supposed to happen, so the exit may be justified to create asap ficing pressure */
#define prog_error() \
{ \
fprintf(stderr, __FILE__ ":%i Option without type flag! This is a programming error! Developer: fix this ASAP to regain your honor.\n", __LINE__); \
exit(1); \
}
if (!(opt->flags & GLO_ARG)) { /* doesn't take argument */
if (opt->var) {
if (opt->flags & GLO_CHAR) /* var is *char */
{
debug1("char at %p", opt->var);
*((char *) opt->var) = (char) opt->value;\
}
else if(opt->flags & GLO_LONG)
{
debug1("long at %p", opt->var);
*( (long *) opt->var ) = opt->value;
}
else if(opt->flags & GLO_INT)
{
debug1("int at %p", opt->var);
*( (int *) opt->var ) = (int) opt->value;
}
/* GLO_DOUBLE is not supported here */
else prog_error();
debug("casting assignment done");
}
else
result = opt->value ? opt->value : opt->sname;
}
else { /* requires argument */
if (loptind >= argc)
return (GLO_NOARG);
loptarg = argv[loptind++]+loptchr;
loptchr = 0;
if (opt->var) {
if (opt->flags & GLO_CHAR) /* var is *char */
*((char **) opt->var) = strdup(loptarg); /* valgrind claims lost memory here */
else if(opt->flags & GLO_LONG)
*((long *) opt->var) = atol(loptarg);
else if(opt->flags & GLO_INT)
*((int *) opt->var) = atoi(loptarg);
else if(opt->flags & GLO_DOUBLE)
*((double *) opt->var) = atof(loptarg);
else prog_error();
}
else
result = opt->value ? opt->value : opt->sname;
}
if (opt->func)
opt->func(loptarg);
return (result);
}
int getsingleopt (int argc, char *argv[], topt *opts)
{
char *thisopt;
topt *opt;
static char shortopt[2] = {0, 0};
if (loptind >= argc)
return (GLO_END);
thisopt = argv[loptind];
debug1("getsingleopt: %s", thisopt);
if (!loptchr) { /* start new option string */
if (thisopt[0] != '-' || !thisopt[1]) /* no more options */
return (GLO_END);
if (thisopt[1] == '-') { /* "--" */
if (thisopt[2]) { /* long option */
loptarg = thisopt+2;
loptind++;
if (!(opt = findopt(1, thisopt+2, opts)))
return (GLO_UNKNOWN);
else
return (performoption(argc, argv, opt));
}
else { /* "--" == end of options */
loptind++;
return (GLO_END);
}
}
else /* start short option(s) */
loptchr = 1;
}
shortopt[0] = thisopt[loptchr];
loptarg = shortopt;
opt = findopt(0, thisopt+(loptchr++), opts);
if (!thisopt[loptchr]) {
loptind++;
loptchr = 0;
}
if (!opt)
return (GLO_UNKNOWN);
else
return (performoption(argc, argv, opt));
}
int getlopt (int argc, char *argv[], topt *opts)
{
int result;
while ((result = getsingleopt(argc, argv, opts)) == GLO_CONTINUE);
return (result);
}
/* EOF */

View file

@ -0,0 +1,77 @@
/*
getlopt: command line option/parameter parsing
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written Oliver Fromme
old timestamp: Tue Apr 8 07:13:39 MET DST 1997
*/
#include <stdlib.h>
#include <string.h>
#ifndef _MPG123_GETLOPT_H_
#define _MPG123_GETLOPT_H_
extern int loptind; /* index in argv[] */
extern int loptchr; /* index in argv[loptind] */
extern char *loptarg; /* points to argument if present, else to option */
typedef struct {
char sname; /* short option name, can be 0 */
char *lname; /* long option name, can be 0 */
int flags; /* see below */
void (*func)(char *); /* called if != 0 (after setting of var) */
void *var; /* type is *long, *char or **char, see below */
long value;
} topt;
/* ThOr: make this clear; distict long from int (since this is != on my Alpha) and really use a flag for every case (spare the 0 case
for .... no flag) */
#define GLO_ARG 1
#define GLO_CHAR 2
#define GLO_INT 4
#define GLO_LONG 8
#define GLO_DOUBLE 16
/* flags:
* bit 0 = 0 - no argument
* if var != NULL
* *var := value or (char)value [see bit 1]
* else
* loptarg = &option
* return ((value != 0) ? value : sname)
* bit 0 = 1 - argument required
* if var != NULL
* *var := atoi(arg) or strdup(arg) [see bit 1]
* else
* loptarg = &arg
* return ((value != 0) ? value : sname)
*
* bit 1 = 1 - var is a pointer to a char (or string),
* and value is interpreted as char
* bit 2 = 1 - var is a pointer to int
* bit 3 = 1 - var is a pointer to long
*
* Note: The options definition is terminated by a topt
* containing only zeroes.
*/
#define GLO_END 0
#define GLO_UNKNOWN -1
#define GLO_NOARG -2
#define GLO_CONTINUE -3
int getlopt (int argc, char *argv[], topt *opts);
/* return values:
* GLO_END (0) end of options
* GLO_UNKNOWN (-1) unknown option *loptarg
* GLO_NOARG (-2) missing argument
* GLO_CONTINUE (-3) (reserved for internal use)
* else - return value according to flags (see above)
*/
#endif

View file

@ -0,0 +1,700 @@
/*
httpget.c: http communication
copyright ?-2011 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written Oliver Fromme
old timestamp: Wed Apr 9 20:57:47 MET DST 1997
Thomas' notes:
I used to do
GET http://server/path HTTP/1.0
But RFC 1945 says: The absoluteURI form is only allowed when the request is being made to a proxy.
so I should not do that. Since name based virtual hosts need the hostname in the request, I still need to provide that info.
Enter HTTP/1.1... there is a Host eader field to use (that mpg123 supposedly has used since some time anyway - but did it really work with my vhost test server)?
Now
GET /path/bla HTTP/1.1\r\nHost: host[:port]
Should work, but as a funny sidenote:
RFC2616: To allow for transition to absoluteURIs in all requests in future versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies.
I was already full-on HTTP/1.1 as I recognized that mpg123 then would have to accept the chunked transfer encoding.
That is not desireable for its purpose... maybe when interleaving of shoutcasts with metadata chunks is supported, we can upgrade to 1.1.
Funny aspect there is that shoutcast servers do not do HTTP/1.1 chunked transfer but implement some different chunking themselves...
*/
#include "mpg123app.h"
#include "httpget.h"
#ifdef NETWORK
#include "resolver.h"
#include <errno.h>
#include "true.h"
#endif
#include "debug.h"
void httpdata_init(struct httpdata *e)
{
mpg123_init_string(&e->content_type);
mpg123_init_string(&e->icy_url);
mpg123_init_string(&e->icy_name);
e->icy_interval = 0;
e->proxystate = PROXY_UNKNOWN;
mpg123_init_string(&e->proxyhost);
mpg123_init_string(&e->proxyport);
}
void httpdata_reset(struct httpdata *e)
{
mpg123_free_string(&e->content_type);
mpg123_free_string(&e->icy_url);
mpg123_free_string(&e->icy_name);
e->icy_interval = 0;
/* the other stuff shall persist */
}
void httpdata_free(struct httpdata *e)
{
httpdata_reset(e);
mpg123_free_string(&e->proxyhost);
mpg123_free_string(&e->proxyport);
}
/* mime type classes */
#define M_FILE 0
#define M_M3U 1
#define M_PLS 2
static const char* mime_file[] =
{
"audio/mpeg", "audio/x-mpeg",
"audio/mp3", "audio/x-mp3",
"audio/mpeg3", "audio/x-mpeg3",
"audio/mpg", "audio/x-mpg",
"audio/x-mpegaudio",
"application/octet-stream", /* Assume raw binary data is some MPEG data. */
NULL
};
static const char* mime_m3u[] = { "audio/mpegurl", "audio/mpeg-url", "audio/x-mpegurl", NULL };
static const char* mime_pls[] = { "audio/x-scpls", "audio/scpls", "application/pls", NULL };
static const char** mimes[] = { mime_file, mime_m3u, mime_pls, NULL };
int debunk_mime(const char* mime)
{
int i,j;
size_t len;
int r = 0;
char *aux;
/* Watch out for such: "audio/x-mpegurl; charset=utf-8" */
aux = strchr(mime, ';');
if(aux != NULL)
{
fprintf(stderr, "Warning: additional info in content-type ignored (%s)\n", aux+1);
/* Just compare up to before the ";". */
len = aux-mime;
}
/* Else, compare the whole string -- including the end. */
else len = strlen(mime)+1;
for(i=0; mimes[i] != NULL; ++i)
for(j=0; mimes[i][j] != NULL; ++j)
if(!strncasecmp(mimes[i][j], mime, len)) goto debunk_result;
debunk_result:
if(mimes[i] != NULL)
{
switch(i)
{
case M_FILE: r = IS_FILE; break;
case M_M3U: r = IS_LIST|IS_M3U; break;
case M_PLS: r = IS_LIST|IS_PLS; break;
default: error("unexpected MIME debunk result -- coding error?!");
}
}
return r;
}
#ifdef NETWORK
#if !defined (WANT_WIN32_SOCKETS)
static int writestring (int fd, mpg123_string *string)
{
size_t result, bytes;
char *ptr = string->p;
bytes = string->fill ? string->fill-1 : 0;
while(bytes)
{
result = write(fd, ptr, bytes);
if(result < 0 && errno != EINTR)
{
perror ("writing http string");
return FALSE;
}
else if(result == 0)
{
error("write: socket closed unexpectedly");
return FALSE;
}
ptr += result;
bytes -= result;
}
return TRUE;
}
static size_t readstring (mpg123_string *string, size_t maxlen, FILE *f)
{
int err;
debug2("Attempting readstring on %d for %"SIZE_P" bytes", f ? fileno(f) : 0, (size_p)maxlen);
string->fill = 0;
while(maxlen == 0 || string->fill < maxlen)
{
if(string->size-string->fill < 1)
if(!mpg123_grow_string(string, string->fill+4096))
{
error("Cannot allocate memory for reading.");
string->fill = 0;
return 0;
}
err = read(fileno(f),string->p+string->fill,1);
/* Whoa... reading one byte at a time... one could ensure the line break in another way, but more work. */
if( err == 1)
{
string->fill++;
if(string->p[string->fill-1] == '\n') break;
}
else if(errno != EINTR)
{
error("Error reading from socket or unexpected EOF.");
string->fill = 0;
/* bail out to prevent endless loop */
return 0;
}
}
if(!mpg123_grow_string(string, string->fill+1))
{
string->fill=0;
}
else
{
string->p[string->fill] = 0;
string->fill++;
}
return string->fill;
}
#endif /* WANT_WIN32_SOCKETS */
void encode64 (char *source,char *destination)
{
static char *Base64Digits =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int n = 0;
int ssiz=strlen(source);
int i;
for (i = 0 ; i < ssiz ; i += 3) {
unsigned int buf;
buf = ((unsigned char *)source)[i] << 16;
if (i+1 < ssiz)
buf |= ((unsigned char *)source)[i+1] << 8;
if (i+2 < ssiz)
buf |= ((unsigned char *)source)[i+2];
destination[n++] = Base64Digits[(buf >> 18) % 64];
destination[n++] = Base64Digits[(buf >> 12) % 64];
if (i+1 < ssiz)
destination[n++] = Base64Digits[(buf >> 6) % 64];
else
destination[n++] = '=';
if (i+2 < ssiz)
destination[n++] = Base64Digits[buf % 64];
else
destination[n++] = '=';
}
destination[n++] = 0;
}
/* Look out for HTTP header field to parse, construct C string with the value.
Attention: Modifies argument, since it's so convenient... */
char *get_header_val(const char *hname, mpg123_string *response)
{
char *tmp = NULL;
size_t prelen = strlen(hname);
/* if header name found, next char is at least something, so just check for : */
if(!strncasecmp(hname, response->p, prelen) && (response->p[prelen] == ':'))
{
++prelen;
if((tmp = strchr(response->p, '\r')) != NULL ) tmp[0] = 0;
if((tmp = strchr(response->p, '\n')) != NULL ) tmp[0] = 0;
tmp = response->p+prelen;
/* I _know_ that there is a terminating zero, so this loop is safe. */
while((tmp[0] == ' ') || (tmp[0] == '\t'))
{
++tmp;
}
}
return tmp;
}
/* Iterate over header field names and storage locations, to possibly get those values. */
void get_header_string(mpg123_string *response, const char *fieldname, mpg123_string *store)
{
char *tmp;
if((tmp = get_header_val(fieldname, response)))
{
if(mpg123_set_string(store, tmp)){ debug2("got %s %s", fieldname, store->p); return; }
else{ error2("unable to set %s to %s!", fieldname, tmp); }
}
}
/* shoutcsast meta data: 1=on, 0=off */
char *httpauth = NULL;
size_t accept_length(void)
{
int i,j;
static size_t l = 0;
if(l) return l;
l += strlen("Accept: ");
for(i=0; mimes[i] != NULL; ++i)
for(j=0; mimes[i][j] != NULL; ++j){ l += strlen(mimes[i][j]) + strlen(", "); }
l += strlen("*/*\r\n");
debug1("initial computation of accept header length: %lu", (unsigned long)l);
return l;
}
/* Returns TRUE or FALSE for success. */
int proxy_init(struct httpdata *hd)
{
int ret = TRUE;
/* If we don't have explicit proxy given, probe the environment. */
if (!param.proxyurl)
if (!(param.proxyurl = getenv("MP3_HTTP_PROXY")))
if (!(param.proxyurl = getenv("http_proxy")))
param.proxyurl = getenv("HTTP_PROXY");
/* Now continue if we have something. */
if (param.proxyurl && param.proxyurl[0] && strcmp(param.proxyurl, "none"))
{
mpg123_string proxyurl;
mpg123_init_string(&proxyurl);
if( !mpg123_set_string(&proxyurl, param.proxyurl)
|| !split_url(&proxyurl, NULL, &hd->proxyhost, &hd->proxyport, NULL))
{
error("splitting proxy URL");
ret = FALSE;
}
else if(param.verbose > 1) fprintf(stderr, "Note: Using proxy %s\n", hd->proxyhost.p);
#if 0 /* not yet there */
if(!try_host_lookup(proxyhost))
{
error("Unknown proxy host \"%s\".\n", proxyhost.p);
ret = FALSE;
}
#endif
mpg123_free_string(&proxyurl);
if(ret) hd->proxystate = PROXY_HOST; /* We got hostname and port settled. */
else hd->proxystate = PROXY_NONE;
}
else hd->proxystate = PROXY_NONE;
return ret;
}
static int append_accept(mpg123_string *s)
{
size_t i,j;
if(!mpg123_add_string(s, "Accept: ")) return FALSE;
/* We prefer what we know. */
for(i=0; mimes[i] != NULL; ++i)
for(j=0; mimes[i][j] != NULL; ++j)
{
if( !mpg123_add_string(s, mimes[i][j])
|| !mpg123_add_string(s, ", ") )
return FALSE;
}
/* Well... in the end, we accept everything, trying to make sense with reality. */
if(!mpg123_add_string(s, "*/*\r\n")) return FALSE;
return TRUE;
}
/*
Converts spaces to "%20" ... actually, I have to ask myself why.
What about converting them to "+" instead? Would make things a lot easier.
Or, on the other hand... what about avoiding HTML encoding at all?
*/
int translate_url(const char *url, mpg123_string *purl)
{
const char *sptr;
/* The length of purl is upper bound by 3*strlen(url) + 1 if
* everything in it is a space (%20) - or any encoded character */
if (strlen(url) >= SIZE_MAX/3)
{
error("URL too long. Skipping...");
return FALSE;
}
/* Prepare purl in one chunk, to minimize mallocs. */
if(!mpg123_resize_string(purl, strlen(url) + 31)) return FALSE;
/*
* 2000-10-21:
* We would like spaces to be automatically converted to %20's when
* fetching via HTTP.
* -- Martin Sjögren <md9ms@mdstud.chalmers.se>
* Hm, why only spaces? Maybe one should do this http stuff more properly...
*/
if ((sptr = strchr(url, ' ')) == NULL)
mpg123_set_string(purl, url);
else
{ /* Note that sptr is set from the if to this else... */
const char *urlptr = url;
mpg123_set_string(purl, "");
do {
if(! ( mpg123_add_substring(purl, urlptr, 0, sptr-urlptr)
&& mpg123_add_string(purl, "%20") ) )
return FALSE;
urlptr = sptr + 1;
} while ((sptr = strchr (urlptr, ' ')) != NULL);
if(!mpg123_add_string(purl, urlptr)) return FALSE;
}
/* now see if a terminating / may be needed */
if(strchr(purl->p+(strncmp("http://", purl->p, 7) ? 0 : 7), '/') == NULL
&& !mpg123_add_string(purl, "/"))
return FALSE;
return TRUE;
}
int fill_request(mpg123_string *request, mpg123_string *host, mpg123_string *port, mpg123_string *httpauth1, int *try_without_port)
{
char* ttemp;
int ret = TRUE;
const char *icy = param.talk_icy ? icy_yes : icy_no;
/* hm, my test redirection had troubles with line break before HTTP/1.0 */
if((ttemp = strchr(request->p,'\r')) != NULL){ *ttemp = 0; request->fill = ttemp-request->p+1; }
if((ttemp = strchr(request->p,'\n')) != NULL){ *ttemp = 0; request->fill = ttemp-request->p+1; }
/* Fill out the request further... */
if( !mpg123_add_string(request, " HTTP/1.0\r\nUser-Agent: ")
|| !mpg123_add_string(request, PACKAGE_NAME)
|| !mpg123_add_string(request, "/")
|| !mpg123_add_string(request, PACKAGE_VERSION)
|| !mpg123_add_string(request, "\r\n") )
return FALSE;
if(host->fill)
{ /* Give virtual hosting a chance... adding the "Host: ... " line. */
debug2("Host: %s:%s", host->p, port->p);
if( mpg123_add_string(request, "Host: ")
&& mpg123_add_string(request, host->p)
&& ( *try_without_port || (
mpg123_add_string(request, ":")
&& mpg123_add_string(request, port->p) ))
&& mpg123_add_string(request, "\r\n") )
{
if(*try_without_port) *try_without_port = 0;
}
else return FALSE;
}
/* Acceptance, stream setup. */
if( !append_accept(request)
|| !mpg123_add_string(request, CONN_HEAD)
|| !mpg123_add_string(request, icy) )
return FALSE;
/* Authorization. */
if (httpauth1->fill || httpauth) {
char *buf;
if(!mpg123_add_string(request,"Authorization: Basic ")) return FALSE;
if(httpauth1->fill) {
if(httpauth1->fill > SIZE_MAX / 4) return FALSE;
buf=(char *)malloc(httpauth1->fill * 4);
if(!buf)
{
error("malloc() failed for http auth, out of memory.");
return FALSE;
}
encode64(httpauth1->p,buf);
} else {
if(strlen(httpauth) > SIZE_MAX / 4 - 4 ) return FALSE;
buf=(char *)malloc((strlen(httpauth) + 1) * 4);
if(!buf)
{
error("malloc() for http auth failed, out of memory.");
return FALSE;
}
encode64(httpauth,buf);
}
if( !mpg123_add_string(request, buf) || !mpg123_add_string(request, "\r\n"))
ret = FALSE;
free(buf); /* Watch out for leaking if you introduce returns before this line. */
}
if(ret) ret = mpg123_add_string(request, "\r\n");
return ret;
}
#if !defined (WANT_WIN32_SOCKETS)
static int resolve_redirect(mpg123_string *response, mpg123_string *request_url, mpg123_string *purl)
{
debug1("request_url:%s", request_url->p);
/* initialized with full old url */
if(!mpg123_copy_string(request_url, purl)) return FALSE;
/* We may strip it down to a prefix ot totally. */
if(strncasecmp(response->p, "Location: http://", 17))
{ /* OK, only partial strip, need prefix for relative path. */
char* ptmp = NULL;
/* though it's not RFC (?), accept relative URIs as wget does */
fprintf(stderr, "NOTE: no complete URL in redirect, constructing one\n");
/* not absolute uri, could still be server-absolute */
/* I prepend a part of the request... out of the request */
if(response->p[10] == '/')
{
/* only prepend http://server/ */
/* I null the first / after http:// */
ptmp = strchr(purl->p+7,'/');
if(ptmp != NULL){ purl->fill = ptmp-purl->p+1; purl->p[purl->fill-1] = 0; }
}
else
{
/* prepend http://server/path/ */
/* now we want the last / */
ptmp = strrchr(purl->p+7, '/');
if(ptmp != NULL){ purl->fill = ptmp-purl->p+2; purl->p[purl->fill-1] = 0; }
}
}
else purl->fill = 0;
debug1("prefix=%s", purl->fill ? purl->p : "");
if(!mpg123_add_string(purl, response->p+10)) return FALSE;
debug1(" purl: %s", purl->p);
debug1("old request_url: %s", request_url->p);
return TRUE;
}
int http_open(char* url, struct httpdata *hd)
{
mpg123_string purl, host, port, path;
mpg123_string request, response, request_url;
mpg123_string httpauth1;
int sock = -1;
int oom = 0;
int relocate, numrelocs = 0;
int got_location = FALSE;
FILE *myfile = NULL;
/*
workaround for http://www.global24music.com/rautemusik/files/extreme/isdn.pls
this site's apache gives me a relocation to the same place when I give the port in Host request field
for the record: Apache/2.0.51 (Fedora)
*/
int try_without_port = 0;
mpg123_init_string(&purl);
mpg123_init_string(&host);
mpg123_init_string(&port);
mpg123_init_string(&path);
mpg123_init_string(&request);
mpg123_init_string(&response);
mpg123_init_string(&request_url);
mpg123_init_string(&httpauth1);
/* Get initial info for proxy server. Once. */
if(hd->proxystate == PROXY_UNKNOWN && !proxy_init(hd)) goto exit;
if(!translate_url(url, &purl)){ oom=1; goto exit; }
/* Don't confuse the different auth strings... */
if(!split_url(&purl, &httpauth1, NULL, NULL, NULL) ){ oom=1; goto exit; }
/* "GET http://" 11
* " HTTP/1.0\r\nUser-Agent: <PACKAGE_NAME>/<PACKAGE_VERSION>\r\n"
* 26 + PACKAGE_NAME + PACKAGE_VERSION
* accept header + accept_length()
* "Authorization: Basic \r\n" 23
* "\r\n" 2
* ... plus the other predefined header lines
*/
/* Just use this estimate as first guess to reduce malloc calls in string library. */
{
size_t length_estimate = 62 + strlen(PACKAGE_NAME) + strlen(PACKAGE_VERSION)
+ accept_length() + strlen(CONN_HEAD) + strlen(icy_yes) + purl.fill;
if( !mpg123_grow_string(&request, length_estimate)
|| !mpg123_grow_string(&response,4096) )
{
oom=1; goto exit;
}
}
do
{
/* Storing the request url, with http:// prepended if needed. */
/* used to be url here... seemed wrong to me (when loop advanced...) */
if(strncasecmp(purl.p, "http://", 7) != 0) mpg123_set_string(&request_url, "http://");
else mpg123_set_string(&request_url, "");
mpg123_add_string(&request_url, purl.p);
if (hd->proxystate >= PROXY_HOST)
{
/* We will connect to proxy, full URL goes into the request. */
if( !mpg123_copy_string(&hd->proxyhost, &host)
|| !mpg123_copy_string(&hd->proxyport, &port)
|| !mpg123_set_string(&request, "GET ")
|| !mpg123_add_string(&request, request_url.p) )
{
oom=1; goto exit;
}
}
else
{
/* We will connect to the host from the URL and only the path goes into the request. */
if(!split_url(&purl, NULL, &host, &port, &path)){ oom=1; goto exit; }
if( !mpg123_set_string(&request, "GET ")
|| !mpg123_add_string(&request, path.p) )
{
oom=1; goto exit;
}
}
if(!fill_request(&request, &host, &port, &httpauth1, &try_without_port)){ oom=1; goto exit; }
httpauth1.fill = 0; /* We use the auth data from the URL only once. */
debug2("attempting to open_connection to %s:%s", host.p, port.p);
sock = open_connection(&host, &port);
if(sock < 0)
{
error1("Unable to establish connection to %s", host.fill ? host.p : "");
goto exit;
}
#define http_failure close(sock); sock=-1; goto exit;
if(param.verbose > 2) fprintf(stderr, "HTTP request:\n%s\n",request.p);
if(!writestring(sock, &request)){ http_failure; }
if (!(myfile = fdopen(sock, "rb")))
{
error1("fdopen: %s", strerror(errno));
http_failure;
}
relocate = FALSE;
/* Arbitrary length limit here... */
#define safe_readstring \
readstring(&response, SIZE_MAX/16, myfile); \
if(response.fill > SIZE_MAX/16) /* > because of appended zero. */ \
{ \
error("HTTP response line exceeds max. length"); \
http_failure; \
} \
else if(response.fill == 0) \
{ \
error("readstring failed"); \
http_failure; \
} \
if(param.verbose > 2) fprintf(stderr, "HTTP in: %s", response.p);
safe_readstring;
{
char *sptr;
if((sptr = strchr(response.p, ' ')))
{
if(response.fill > sptr-response.p+2)
switch (sptr[1])
{
case '3':
relocate = TRUE;
case '2':
break;
default:
fprintf (stderr, "HTTP request failed: %s", sptr+1); /* '\n' is included */
http_failure;
}
else{ error("Too short response,"); http_failure; }
}
}
/* If we are relocated, we need to look out for a Location header. */
got_location = FALSE;
do
{
safe_readstring; /* Think about that: Should we really error out when we get nothing? Could be that the server forgot the trailing empty line... */
if (!strncasecmp(response.p, "Location: ", 10))
{ /* It is a redirection! */
if(!resolve_redirect(&response, &request_url, &purl)){ oom=1, http_failure; }
if(!strcmp(purl.p, request_url.p))
{
warning("relocated to very same place! trying request again without host port");
try_without_port = 1;
}
got_location = TRUE;
}
else
{ /* We got a header line (or the closing empty line). */
char *tmp;
debug1("searching for header values... %s", response.p);
/* Not sure if I want to bail out on error here. */
/* Also: What text encoding are these strings in? Doesn't need to be plain ASCII... */
get_header_string(&response, "content-type", &hd->content_type);
get_header_string(&response, "icy-name", &hd->icy_name);
get_header_string(&response, "icy-url", &hd->icy_url);
/* watch out for icy-metaint */
if((tmp = get_header_val("icy-metaint", &response)))
{
hd->icy_interval = (off_t) atol(tmp); /* atoll ? */
debug1("got icy-metaint %li", (long int)hd->icy_interval);
}
}
} while(response.p[0] != '\r' && response.p[0] != '\n');
} while(relocate && got_location && purl.fill && numrelocs++ < HTTP_MAX_RELOCATIONS);
if(relocate)
{
if(!got_location)
error("Server meant to redirect but failed to provide a location!");
else
error1("Too many HTTP relocations (%i).", numrelocs);
http_failure;
}
exit: /* The end as well as the exception handling point... */
if(oom) error("Apparently, I ran out of memory or had some bad input data...");
mpg123_free_string(&purl);
mpg123_free_string(&host);
mpg123_free_string(&port);
mpg123_free_string(&path);
mpg123_free_string(&request);
mpg123_free_string(&response);
mpg123_free_string(&request_url);
mpg123_free_string(&httpauth1);
return sock;
}
#endif /*WANT_WIN32_SOCKETS*/
#else /* NETWORK */
/* stub */
int http_open (char* url, struct httpdata *hd)
{
return -1;
}
#endif
/* EOF */

View file

@ -0,0 +1,66 @@
/*
httpget: HTTP input routines (the header)
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Thomas Orgis
Note about MIME types:
You feed debunk_mime() a MIME string and it classifies it as it is relevant for mpg123.
In httpget.c are the MIME class lists, which may be appended to to support more bogus MIME types.
*/
#ifndef _HTTPGET_H_
#define _HTTPGET_H_
#include "mpg123.h"
/* Pulled in by mpg123app.h! */
struct httpdata
{
mpg123_string content_type;
mpg123_string icy_name;
mpg123_string icy_url;
off_t icy_interval;
mpg123_string proxyhost;
mpg123_string proxyport;
/* Partly dummy for now... later proxy host resolution will be cached (PROXY_ADDR). */
enum { PROXY_UNKNOWN=0, PROXY_NONE, PROXY_HOST, PROXY_ADDR } proxystate;
};
void httpdata_init(struct httpdata *e);
void httpdata_reset(struct httpdata *e);
void httpdata_free(struct httpdata *e);
/* There is a whole lot of MIME types for the same thing.
the function will reduce it to a combination of these flags */
#define IS_FILE 1
#define IS_LIST 2
#define IS_M3U 4
#define IS_PLS 8
#define HTTP_MAX_RELOCATIONS 20
int debunk_mime(const char* mime);
/*Previously static functions, shared for win32_net_support */
int proxy_init(struct httpdata *hd);
int translate_url(const char *url, mpg123_string *purl);
size_t accept_length(void);
int fill_request(mpg123_string *request, mpg123_string *host, mpg123_string *port, mpg123_string *httpauth1, int *try_without_port);
void get_header_string(mpg123_string *response, const char *fieldname, mpg123_string *store);
char *get_header_val(const char *hname, mpg123_string *response);
/* needed for HTTP/1.1 non-pipelining mode */
/* #define CONN_HEAD "Connection: close\r\n" */
#define CONN_HEAD ""
#define icy_yes "Icy-MetaData: 1\r\n"
#define icy_no "Icy-MetaData: 0\r\n"
extern char *proxyurl;
extern unsigned long proxyip;
/* takes url and content type string address, opens resource, returns fd for data, allocates and sets content type */
extern int http_open (char* url, struct httpdata *hd);
extern char *httpauth;
#endif

View file

@ -0,0 +1,74 @@
/*
legacy_module.c: dummy interface to modular code loader for legacy build system
copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Nicholas J Humfrey
*/
#include "mpg123app.h"
#include "debug.h"
/* A single module is staticly compiled in for each type */
extern mpg123_module_t mpg123_output_module_info;
/* extern mpg123_module_t mpg123_input_module_info; */
/* Open a module */
mpg123_module_t*
open_module( const char* type, const char* name )
{
mpg123_module_t *mod = NULL;
/* Select the module info structure, based on the desired type */
if (strcmp(type, "output")==0) {
mod = &mpg123_output_module_info;
/*
} else if (strcmp(type, "input")==0) {
mod = &mpg123_input_module_info;
*/
} else {
error1("Unable to open module type '%s'.", type);
return NULL;
}
/* Check the module compiled in is the module requested */
if (strcmp(name, mod->name)!=0) {
error1("Unable to open requested module '%s'.", name);
error1("The only available statically compiled module is '%s'.", mod->name);
return NULL;
}
/* Debugging info */
debug1("Details of static module type '%s':", type);
debug1(" api_version=%d", mod->api_version);
debug1(" name=%s", mod->name);
debug1(" description=%s", mod->description);
debug1(" revision=%s", mod->revision);
debug1(" handle=%p", (void*)mod->handle);
return mod;
}
void close_module( mpg123_module_t* module )
{
debug("close_module()");
/* Module was never really 'loaded', so nothing to do here. */
}
void list_modules()
{
debug("list_modules()" );
printf("\nmpg123 has been built in legacy mode - dynamic modules are not available.\n");
printf("Available modules\n");
printf("-----------------\n");
printf("%-15s%s %s\n", mpg123_output_module_info.name, "output", mpg123_output_module_info.description );
}

View file

@ -0,0 +1,141 @@
## Makefile.am: produce Makefile.in from this
## copyright by the mpg123 project - free software under the terms of the LGPL 2.1
## see COPYING and AUTHORS files in distribution or http://mpg123.org
## initially written by Nicholas J. Humfrey
#AM_CFLAGS = @AUDIO_CFLAGS@
#AM_LDFLAGS =
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123
EXTRA_DIST = mpg123.h.in
EXTRA_PROGRAMS = testcpu
testcpu_dependencies = getcpuflags.$(OBJEXT)
testcpu_sources = testcpu.c
testcpu_LDADD = getcpuflags.$(OBJEXT)
CLEANFILES = *.a
# The library can have different names, depending on largefile setup.
# Libtool macros think they're smart. Because of that mpg123.la does not work, it must be libmpg123.la .
lib_LTLIBRARIES = libmpg123.la
nodist_include_HEADERS = mpg123.h
libmpg123_la_LDFLAGS = -no-undefined -version-info @LIBMPG123_VERSION@ -export-symbols-regex '^mpg123_'
libmpg123_la_LIBADD = @DECODER_LOBJ@ @LFS_LOBJ@
libmpg123_la_DEPENDENCIES = @DECODER_LOBJ@ @LFS_LOBJ@
libmpg123_la_SOURCES = \
intsym.h \
compat.c \
compat.h \
mpeghead.h \
parse.c \
parse.h \
frame.c \
format.c \
frame.h \
reader.h \
debug.h \
decode.h \
sample.h \
dct64.c \
synth.h \
synth_mono.h \
synth_ntom.h \
synth_8bit.h \
synths.h \
equalizer.c \
huffman.h \
icy.h \
icy2utf8.h \
id3.h \
id3.c \
true.h \
getbits.h \
optimize.h \
optimize.c \
readers.c \
tabinit.c \
libmpg123.c \
gapless.h \
mpg123lib_intern.h \
mangle.h \
getcpuflags.h \
index.h \
index.c
EXTRA_libmpg123_la_SOURCES = \
lfs_alias.c \
lfs_wrap.c \
icy.c \
icy2utf8.c \
l2tables.h \
layer1.c \
layer2.c \
layer3.c \
dither.h \
dither.c \
feature.c \
dct36_3dnowext.S \
dct36_3dnow.S \
dct64_3dnowext.S \
dct64_3dnow.S \
dct64_altivec.c \
dct64_i386.c \
dct64_i486.c \
dct64_mmx.S \
dct64_sse.S \
dct64_sse_float.S \
dct64_x86_64.S \
dct64_x86_64_float.S \
dct64_neon.S \
dct64_neon_float.S \
synth_3dnowext.S \
synth_3dnow.S \
synth_altivec.c \
synth_i486.c \
synth_i586_dither.S \
synth_i586.S \
synth_mmx.S \
synth_sse3d.h \
synth_sse.S \
synth_sse_float.S \
synth_sse_s32.S \
synth_sse_accurate.S \
synth_stereo_sse_float.S \
synth_stereo_sse_s32.S \
synth_stereo_sse_accurate.S \
synth_x86_64.S \
synth_x86_64_float.S \
synth_x86_64_s32.S \
synth_x86_64_accurate.S \
synth_stereo_x86_64.S \
synth_stereo_x86_64_float.S \
synth_stereo_x86_64_s32.S \
synth_stereo_x86_64_accurate.S \
synth_arm.S \
synth_arm_accurate.S \
synth_neon.S \
synth_neon_float.S \
synth_neon_s32.S \
synth_neon_accurate.S \
synth_stereo_neon.S \
synth_stereo_neon_float.S \
synth_stereo_neon_s32.S \
synth_stereo_neon_accurate.S \
ntom.c \
synth.c \
synth_8bit.c \
synth_real.c \
synth_s32.c \
equalizer_3dnow.S \
tabinit_mmx.S \
stringbuf.c \
getcpuflags.S \
l12_integer_tables.h \
l3_integer_tables.h

View file

@ -0,0 +1,919 @@
# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = testcpu$(EXEEXT)
subdir = src/libmpg123
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/mpg123.h.in $(top_srcdir)/build/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = mpg123.h
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am_libmpg123_la_OBJECTS = compat.lo parse.lo frame.lo format.lo \
dct64.lo equalizer.lo id3.lo optimize.lo readers.lo tabinit.lo \
libmpg123.lo index.lo
libmpg123_la_OBJECTS = $(am_libmpg123_la_OBJECTS)
libmpg123_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libmpg123_la_LDFLAGS) $(LDFLAGS) -o $@
testcpu_SOURCES = testcpu.c
testcpu_OBJECTS = testcpu.$(OBJEXT)
testcpu_DEPENDENCIES = getcpuflags.$(OBJEXT)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/build/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libmpg123_la_SOURCES) $(EXTRA_libmpg123_la_SOURCES) \
testcpu.c
DIST_SOURCES = $(libmpg123_la_SOURCES) $(EXTRA_libmpg123_la_SOURCES) \
testcpu.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(nodist_include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX_CFLAGS = @AIX_CFLAGS@
AIX_LDFLAGS = @AIX_LDFLAGS@
AIX_LIBS = @AIX_LIBS@
ALIB_CFLAGS = @ALIB_CFLAGS@
ALIB_LDFLAGS = @ALIB_LDFLAGS@
ALIB_LIBS = @ALIB_LIBS@
ALSA_CFLAGS = @ALSA_CFLAGS@
ALSA_LDFLAGS = @ALSA_LDFLAGS@
ALSA_LIBS = @ALSA_LIBS@
AMTAR = @AMTAR@
API_VERSION = @API_VERSION@
AR = @AR@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_LDFLAGS = @ARTS_LDFLAGS@
ARTS_LIBS = @ARTS_LIBS@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@
COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@
COREAUDIO_LIBS = @COREAUDIO_LIBS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DECODER_LOBJ = @DECODER_LOBJ@
DECODER_OBJ = @DECODER_OBJ@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMMY_CFLAGS = @DUMMY_CFLAGS@
DUMMY_LDFLAGS = @DUMMY_LDFLAGS@
DUMMY_LIBS = @DUMMY_LIBS@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ESD_CFLAGS = @ESD_CFLAGS@
ESD_LDFLAGS = @ESD_LDFLAGS@
ESD_LIBS = @ESD_LIBS@
EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HP_CFLAGS = @HP_CFLAGS@
HP_LDFLAGS = @HP_LDFLAGS@
HP_LIBS = @HP_LIBS@
INCLUDE_STDIO_H = @INCLUDE_STDIO_H@
INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@
INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JACK_CFLAGS = @JACK_CFLAGS@
JACK_LDFLAGS = @JACK_LDFLAGS@
JACK_LIBS = @JACK_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LFS_LOBJ = @LFS_LOBJ@
LIBMPG123_VERSION = @LIBMPG123_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_LDFLAGS = @LT_LDFLAGS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MINT_CFLAGS = @MINT_CFLAGS@
MINT_LDFLAGS = @MINT_LDFLAGS@
MINT_LIBS = @MINT_LIBS@
MKDIR_P = @MKDIR_P@
MODULE_OBJ = @MODULE_OBJ@
NAS_CFLAGS = @NAS_CFLAGS@
NAS_LDFLAGS = @NAS_LDFLAGS@
NAS_LIBS = @NAS_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENAL_CFLAGS = @OPENAL_CFLAGS@
OPENAL_LDFLAGS = @OPENAL_LDFLAGS@
OPENAL_LIBS = @OPENAL_LIBS@
OS2_CFLAGS = @OS2_CFLAGS@
OS2_LDFLAGS = @OS2_LDFLAGS@
OS2_LIBS = @OS2_LIBS@
OSS_CFLAGS = @OSS_CFLAGS@
OSS_LDFLAGS = @OSS_LDFLAGS@
OSS_LIBS = @OSS_LIBS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
OUTPUT_CFLAGS = @OUTPUT_CFLAGS@
OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@
OUTPUT_LIBS = @OUTPUT_LIBS@
OUTPUT_MOD = @OUTPUT_MOD@
OUTPUT_OBJ = @OUTPUT_OBJ@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@
PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@
PORTAUDIO_LIBS = @PORTAUDIO_LIBS@
PULSE_CFLAGS = @PULSE_CFLAGS@
PULSE_LDFLAGS = @PULSE_LDFLAGS@
PULSE_LIBS = @PULSE_LIBS@
RANLIB = @RANLIB@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_LDFLAGS = @SDL_LDFLAGS@
SDL_LIBS = @SDL_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SGI_CFLAGS = @SGI_CFLAGS@
SGI_LDFLAGS = @SGI_LDFLAGS@
SGI_LIBS = @SGI_LIBS@
SHELL = @SHELL@
SNDIO_CFLAGS = @SNDIO_CFLAGS@
SNDIO_LDFLAGS = @SNDIO_LDFLAGS@
SNDIO_LIBS = @SNDIO_LIBS@
STRIP = @STRIP@
SUN_CFLAGS = @SUN_CFLAGS@
SUN_LDFLAGS = @SUN_LDFLAGS@
SUN_LIBS = @SUN_LIBS@
VERSION = @VERSION@
WIN32_CFLAGS = @WIN32_CFLAGS@
WIN32_LDFLAGS = @WIN32_LDFLAGS@
WIN32_LIBS = @WIN32_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#AM_CFLAGS = @AUDIO_CFLAGS@
#AM_LDFLAGS =
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123
EXTRA_DIST = mpg123.h.in
testcpu_dependencies = getcpuflags.$(OBJEXT)
testcpu_sources = testcpu.c
testcpu_LDADD = getcpuflags.$(OBJEXT)
CLEANFILES = *.a
# The library can have different names, depending on largefile setup.
# Libtool macros think they're smart. Because of that mpg123.la does not work, it must be libmpg123.la .
lib_LTLIBRARIES = libmpg123.la
nodist_include_HEADERS = mpg123.h
libmpg123_la_LDFLAGS = -no-undefined -version-info @LIBMPG123_VERSION@ -export-symbols-regex '^mpg123_'
libmpg123_la_LIBADD = @DECODER_LOBJ@ @LFS_LOBJ@
libmpg123_la_DEPENDENCIES = @DECODER_LOBJ@ @LFS_LOBJ@
libmpg123_la_SOURCES = \
intsym.h \
compat.c \
compat.h \
mpeghead.h \
parse.c \
parse.h \
frame.c \
format.c \
frame.h \
reader.h \
debug.h \
decode.h \
sample.h \
dct64.c \
synth.h \
synth_mono.h \
synth_ntom.h \
synth_8bit.h \
synths.h \
equalizer.c \
huffman.h \
icy.h \
icy2utf8.h \
id3.h \
id3.c \
true.h \
getbits.h \
optimize.h \
optimize.c \
readers.c \
tabinit.c \
libmpg123.c \
gapless.h \
mpg123lib_intern.h \
mangle.h \
getcpuflags.h \
index.h \
index.c
EXTRA_libmpg123_la_SOURCES = \
lfs_alias.c \
lfs_wrap.c \
icy.c \
icy2utf8.c \
l2tables.h \
layer1.c \
layer2.c \
layer3.c \
dither.h \
dither.c \
feature.c \
dct36_3dnowext.S \
dct36_3dnow.S \
dct64_3dnowext.S \
dct64_3dnow.S \
dct64_altivec.c \
dct64_i386.c \
dct64_i486.c \
dct64_mmx.S \
dct64_sse.S \
dct64_sse_float.S \
dct64_x86_64.S \
dct64_x86_64_float.S \
dct64_neon.S \
dct64_neon_float.S \
synth_3dnowext.S \
synth_3dnow.S \
synth_altivec.c \
synth_i486.c \
synth_i586_dither.S \
synth_i586.S \
synth_mmx.S \
synth_sse3d.h \
synth_sse.S \
synth_sse_float.S \
synth_sse_s32.S \
synth_sse_accurate.S \
synth_stereo_sse_float.S \
synth_stereo_sse_s32.S \
synth_stereo_sse_accurate.S \
synth_x86_64.S \
synth_x86_64_float.S \
synth_x86_64_s32.S \
synth_x86_64_accurate.S \
synth_stereo_x86_64.S \
synth_stereo_x86_64_float.S \
synth_stereo_x86_64_s32.S \
synth_stereo_x86_64_accurate.S \
synth_arm.S \
synth_arm_accurate.S \
synth_neon.S \
synth_neon_float.S \
synth_neon_s32.S \
synth_neon_accurate.S \
synth_stereo_neon.S \
synth_stereo_neon_float.S \
synth_stereo_neon_s32.S \
synth_stereo_neon_accurate.S \
ntom.c \
synth.c \
synth_8bit.c \
synth_real.c \
synth_s32.c \
equalizer_3dnow.S \
tabinit_mmx.S \
stringbuf.c \
getcpuflags.S \
l12_integer_tables.h \
l3_integer_tables.h
all: all-am
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libmpg123/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/libmpg123/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mpg123.h: $(top_builddir)/config.status $(srcdir)/mpg123.h.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libmpg123.la: $(libmpg123_la_OBJECTS) $(libmpg123_la_DEPENDENCIES) $(EXTRA_libmpg123_la_DEPENDENCIES)
$(libmpg123_la_LINK) -rpath $(libdir) $(libmpg123_la_OBJECTS) $(libmpg123_la_LIBADD) $(LIBS)
testcpu$(EXEEXT): $(testcpu_OBJECTS) $(testcpu_DEPENDENCIES) $(EXTRA_testcpu_DEPENDENCIES)
@rm -f testcpu$(EXEEXT)
$(LINK) $(testcpu_OBJECTS) $(testcpu_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct36_3dnow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct36_3dnowext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_3dnow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_3dnowext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_altivec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_i386.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_i486.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_mmx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_neon.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_neon_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_sse.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_sse_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_x86_64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_x86_64_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer_3dnow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feature.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcpuflags.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icy2utf8.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id3.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer3.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfs_alias.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfs_wrap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpg123.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntom.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optimize.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringbuf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_3dnow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_3dnowext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_8bit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_altivec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_arm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_arm_accurate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i486.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i586.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i586_dither.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_mmx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_accurate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_s32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_real.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_s32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_accurate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_s32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_accurate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_s32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_accurate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_s32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_accurate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_s32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_accurate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_float.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_s32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabinit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabinit_mmx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcpu.Po@am__quote@
.S.o:
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $<
.S.obj:
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.S.lo:
@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $<
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-nodist_includeHEADERS: $(nodist_include_HEADERS)
@$(NORMAL_INSTALL)
@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
done
uninstall-nodist_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-nodist_includeHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man \
install-nodist_includeHEADERS install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-libLTLIBRARIES \
uninstall-nodist_includeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,138 @@
/*
compat: Some compatibility functions.
The mpg123 code is determined to keep it's legacy. A legacy of old, old UNIX.
So anything possibly somewhat advanced should be considered to be put here, with proper #ifdef;-)
copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Thomas Orgis, Windows Unicode stuff by JonY.
*/
#include "config.h"
#include "compat.h"
#ifdef _MSC_VER
#include <io.h>
#else
#include <fcntl.h>
#endif
#include <sys/stat.h>
#ifdef WANT_WIN32_UNICODE
#include <wchar.h>
#include <windows.h>
#include <winnls.h>
#endif
#include "debug.h"
/* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */
void *safe_realloc(void *ptr, size_t size)
{
if(ptr == NULL) return malloc(size);
else return realloc(ptr, size);
}
#ifndef HAVE_STRERROR
const char *strerror(int errnum)
{
extern int sys_nerr;
extern char *sys_errlist[];
return (errnum < sys_nerr) ? sys_errlist[errnum] : "";
}
#endif
#ifndef HAVE_STRDUP
char *strdup(const char *src)
{
char *dest;
if (!(dest = (char *) malloc(strlen(src)+1)))
return NULL;
else
return strcpy(dest, src);
}
#endif
int compat_open(const char *filename, int flags)
{
int ret;
#if defined (WANT_WIN32_UNICODE)
wchar_t *frag = NULL;
ret = win32_utf8_wide(filename, &frag, NULL);
if ((frag == NULL) || (ret == 0)) goto fallback; /* Fallback to plain open when ucs-2 conversion fails */
ret = _wopen(frag, flags); /*Try _wopen */
if (ret != -1 ) goto open_ok; /* msdn says -1 means failure */
fallback:
#endif
#if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */
ret = _open(filename, flags); /* Try plain old _open(), if it fails, do nothing */
#else
/* On UNIX, we always add a default permission mask in case flags|O_CREAT. */
ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
#endif
#if defined (WANT_WIN32_UNICODE)
open_ok:
free ((void *)frag); /* Freeing a NULL should be OK */
#endif
return ret;
}
int compat_close(int infd)
{
#if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */
return _close(infd);
#else
return close(infd);
#endif
}
/* Windows Unicode stuff */
#ifdef WANT_WIN32_UNICODE
int win32_wide_utf8(const wchar_t * const wptr, char **mbptr, size_t * buflen)
{
size_t len;
char *buf;
int ret = 0;
len = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, NULL, 0, NULL, NULL); /* Get utf-8 string length */
buf = calloc(len + 1, sizeof (char)); /* Can we assume sizeof char always = 1? */
if(!buf) len = 0;
else {
if (len != 0) ret = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, buf, len, NULL, NULL); /*Do actual conversion*/
buf[len] = '0'; /* Must terminate */
}
*mbptr = buf; /* Set string pointer to allocated buffer */
if(buflen != NULL) *buflen = (len) * sizeof (char); /* Give length of allocated memory if needed. */
return ret;
}
int win32_utf8_wide(const char *const mbptr, wchar_t **wptr, size_t *buflen)
{
size_t len;
wchar_t *buf;
int ret = 0;
len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, NULL, 0); /* Get converted size */
buf = calloc(len + 1, sizeof (wchar_t)); /* Allocate memory accordingly */
if(!buf) len = 0;
else {
if (len != 0) ret = MultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, buf, len); /* Do conversion */
buf[len] = L'0'; /* Must terminate */
}
*wptr = buf; /* Set string pointer to allocated buffer */
if (buflen != NULL) *buflen = len * sizeof (wchar_t); /* Give length of allocated memory if needed. */
return ret; /* Number of characters written */
}
#endif

View file

@ -0,0 +1,178 @@
/*
compat: Some compatibility functions and header inclusions.
Basic standard C stuff, that may barely be above/around C89.
The mpg123 code is determined to keep it's legacy. A legacy of old, old UNIX.
It is envisioned to include this compat header instead of any of the "standard" headers, to catch compatibility issues.
So, don't include stdlib.h or string.h ... include compat.h.
copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Thomas Orgis
*/
#ifndef MPG123_COMPAT_H
#define MPG123_COMPAT_H
#include "config.h"
#include "intsym.h"
#ifdef HAVE_STDLIB_H
/* realloc, size_t */
#include <stdlib.h>
#endif
#include <stdio.h>
#include <math.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#else
#ifdef HAVE_SYS_SIGNAL_H
#include <sys/signal.h>
#endif
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
/* Types, types, types. */
/* Do we actually need these two in addition to sys/types.h? As replacement? */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
/* We want SIZE_MAX, etc. */
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t)-1)
#endif
#ifndef ULONG_MAX
#define ULONG_MAX ((unsigned long)-1)
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef OS2
#include <float.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
/* For select(), I need select.h according to POSIX 2001, else: sys/time.h sys/types.h unistd.h */
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
/* To parse big numbers... */
#ifdef HAVE_ATOLL
#define atobigint atoll
#else
#define atobigint atol
#endif
typedef unsigned char byte;
/* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */
void *safe_realloc(void *ptr, size_t size);
#ifndef HAVE_STRERROR
const char *strerror(int errnum);
#endif
#ifndef HAVE_STRDUP
char *strdup(const char *s);
#endif
/* If we have the size checks enabled, try to derive some sane printfs.
Simple start: Use max integer type and format if long is not big enough.
I am hesitating to use %ll without making sure that it's there... */
#if !(defined PLAIN_C89) && (defined SIZEOF_OFF_T) && (SIZEOF_OFF_T > SIZEOF_LONG) && (defined PRIiMAX)
# define OFF_P PRIiMAX
typedef intmax_t off_p;
#else
# define OFF_P "li"
typedef long off_p;
#endif
#if !(defined PLAIN_C89) && (defined SIZEOF_SIZE_T) && (SIZEOF_SIZE_T > SIZEOF_LONG) && (defined PRIuMAX)
# define SIZE_P PRIuMAX
typedef uintmax_t size_p;
#else
# define SIZE_P "lu"
typedef unsigned long size_p;
#endif
#if !(defined PLAIN_C89) && (defined SIZEOF_SSIZE_T) && (SIZEOF_SSIZE_T > SIZEOF_LONG) && (defined PRIiMAX)
# define SSIZE_P PRIuMAX
typedef intmax_t ssize_p;
#else
# define SSIZE_P "li"
typedef long ssize_p;
#endif
/**
* Opening a file handle can be different.
* This function here is defined to take a path in native encoding (ISO8859 / UTF-8 / ...), or, when MS Windows Unicode support is enabled, an UTF-8 string that will be converted back to native UCS-2 (wide character) before calling the system's open function.
* @param[in] wptr Pointer to wide string.
* @param[in] mbptr Pointer to multibyte string.
* @return file descriptor (>=0) or error code.
*/
int compat_open(const char *filename, int flags);
/**
* Closing a file handle can be platform specific.
* This function takes a file descriptor that is to be closed.
* @param[in] infd File descriptor to be closed.
* @return 0 if the file was successfully closed. A return value of -1 indicates an error.
*/
int compat_close(int infd);
/* Those do make sense in a separate file, but I chose to include them in compat.c because that's the one source whose object is shared between mpg123 and libmpg123 -- and both need the functionality internally. */
#ifdef WANT_WIN32_UNICODE
/**
* win32_uni2mbc
* Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent.
* Caller is supposed to free allocated buffer.
* @param[in] wptr Pointer to wide string.
* @param[out] mbptr Pointer to multibyte string.
* @param[out] buflen Optional parameter for length of allocated buffer.
* @return status of WideCharToMultiByte conversion.
*
* WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx
*/
int win32_wide_utf8(const wchar_t * const wptr, char **mbptr, size_t * buflen);
/**
* win32_mbc2uni
* Converts a null terminated UTF-8 string to a UCS-2 equivalent.
* Caller is supposed to free allocated buffer.
* @param[out] mbptr Pointer to multibyte string.
* @param[in] wptr Pointer to wide string.
* @param[out] buflen Optional parameter for length of allocated buffer.
* @return status of WideCharToMultiByte conversion.
*
* MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx
*/
int win32_utf8_wide(const char *const mbptr, wchar_t **wptr, size_t *buflen);
#endif
/* That one comes from Tellie on OS/2, needed in resolver. */
#ifdef __KLIBC__
typedef int socklen_t;
#endif
#endif

View file

@ -0,0 +1,505 @@
/*
dct64_3dnow.s: Replacement of dct36() with AMD's 3DNow! SIMD operations support
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Syuuhei Kashiyama
This code based 'dct36_3dnow.s' by Syuuhei Kashiyama
<squash@mb.kcom.ne.jp>,only two types of changes have been made:
- remove PREFETCH instruction for speedup
- change function name for support 3DNow! automatic detect
You can find Kashiyama's original 3dnow! support patch
(for mpg123-0.59o) at
http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese).
by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1999
<kim@comtec.co.jp> - after 1.Apr.1999
Replacement of dct36() with AMD's 3DNow! SIMD operations support
Syuuhei Kashiyama <squash@mb.kcom.ne.jp>
The author of this program disclaim whole expressed or implied
warranties with regard to this program, and in no event shall the
author of this program liable to whatever resulted from the use of
this program. Use it at your own risk.
*/
#include "mangle.h"
.globl ASM_NAME(dct36_3dnow)
/* .type ASM_NAME(dct36_3dnow),@function */
ASM_NAME(dct36_3dnow):
pushl %ebp
movl %esp,%ebp
subl $120,%esp
pushl %esi
pushl %ebx
movl 8(%ebp),%eax
movl 12(%ebp),%esi
movl 16(%ebp),%ecx
movl 20(%ebp),%edx
movl 24(%ebp),%ebx
leal -128(%ebp),%esp
femms
movq (%eax),%mm0
movq 4(%eax),%mm1
pfadd %mm1,%mm0
movq %mm0,4(%eax)
psrlq $32,%mm1
movq 12(%eax),%mm2
punpckldq %mm2,%mm1
pfadd %mm2,%mm1
movq %mm1,12(%eax)
psrlq $32,%mm2
movq 20(%eax),%mm3
punpckldq %mm3,%mm2
pfadd %mm3,%mm2
movq %mm2,20(%eax)
psrlq $32,%mm3
movq 28(%eax),%mm4
punpckldq %mm4,%mm3
pfadd %mm4,%mm3
movq %mm3,28(%eax)
psrlq $32,%mm4
movq 36(%eax),%mm5
punpckldq %mm5,%mm4
pfadd %mm5,%mm4
movq %mm4,36(%eax)
psrlq $32,%mm5
movq 44(%eax),%mm6
punpckldq %mm6,%mm5
pfadd %mm6,%mm5
movq %mm5,44(%eax)
psrlq $32,%mm6
movq 52(%eax),%mm7
punpckldq %mm7,%mm6
pfadd %mm7,%mm6
movq %mm6,52(%eax)
psrlq $32,%mm7
movq 60(%eax),%mm0
punpckldq %mm0,%mm7
pfadd %mm0,%mm7
movq %mm7,60(%eax)
psrlq $32,%mm0
movd 68(%eax),%mm1
pfadd %mm1,%mm0
movd %mm0,68(%eax)
movd 4(%eax),%mm0
movd 12(%eax),%mm1
punpckldq %mm1,%mm0
punpckldq 20(%eax),%mm1
pfadd %mm1,%mm0
movd %mm0,12(%eax)
psrlq $32,%mm0
movd %mm0,20(%eax)
psrlq $32,%mm1
movd 28(%eax),%mm2
punpckldq %mm2,%mm1
punpckldq 36(%eax),%mm2
pfadd %mm2,%mm1
movd %mm1,28(%eax)
psrlq $32,%mm1
movd %mm1,36(%eax)
psrlq $32,%mm2
movd 44(%eax),%mm3
punpckldq %mm3,%mm2
punpckldq 52(%eax),%mm3
pfadd %mm3,%mm2
movd %mm2,44(%eax)
psrlq $32,%mm2
movd %mm2,52(%eax)
psrlq $32,%mm3
movd 60(%eax),%mm4
punpckldq %mm4,%mm3
punpckldq 68(%eax),%mm4
pfadd %mm4,%mm3
movd %mm3,60(%eax)
psrlq $32,%mm3
movd %mm3,68(%eax)
movq 24(%eax),%mm0
movq 48(%eax),%mm1
movd ASM_NAME(COS9)+12,%mm2
punpckldq %mm2,%mm2
movd ASM_NAME(COS9)+24,%mm3
punpckldq %mm3,%mm3
pfmul %mm2,%mm0
pfmul %mm3,%mm1
pushl %eax
movl $1,%eax
movd %eax,%mm7
pi2fd %mm7,%mm7
popl %eax
movq 8(%eax),%mm2
movd ASM_NAME(COS9)+4,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
pfadd %mm0,%mm2
movq 40(%eax),%mm3
movd ASM_NAME(COS9)+20,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq 56(%eax),%mm3
movd ASM_NAME(COS9)+28,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq (%eax),%mm3
movq 16(%eax),%mm4
movd ASM_NAME(COS9)+8,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
movq 32(%eax),%mm4
movd ASM_NAME(COS9)+16,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
pfadd %mm1,%mm3
movq 64(%eax),%mm4
movd ASM_NAME(COS9)+32,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+0,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 108(%edx),%mm6
punpckldq 104(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,36(%ecx)
psrlq $32,%mm5
movd %mm5,32(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 32(%edx),%mm6
punpckldq 36(%edx),%mm6
pfmul %mm6,%mm5
movd 32(%esi),%mm6
punpckldq 36(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,1024(%ebx)
psrlq $32,%mm5
movd %mm5,1152(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+32,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 140(%edx),%mm6
punpckldq 72(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,68(%ecx)
psrlq $32,%mm5
movd %mm5,0(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 0(%edx),%mm6
punpckldq 68(%edx),%mm6
pfmul %mm6,%mm5
movd 0(%esi),%mm6
punpckldq 68(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,0(%ebx)
psrlq $32,%mm5
movd %mm5,2176(%ebx)
movq 8(%eax),%mm2
movq 40(%eax),%mm3
pfsub %mm3,%mm2
movq 56(%eax),%mm3
pfsub %mm3,%mm2
movd ASM_NAME(COS9)+12,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
movq 16(%eax),%mm3
movq 32(%eax),%mm4
pfsub %mm4,%mm3
movq 64(%eax),%mm4
pfsub %mm4,%mm3
movd ASM_NAME(COS9)+24,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
movq 48(%eax),%mm4
pfsub %mm4,%mm3
movq (%eax),%mm4
pfadd %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+4,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 112(%edx),%mm6
punpckldq 100(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,40(%ecx)
psrlq $32,%mm5
movd %mm5,28(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 28(%edx),%mm6
punpckldq 40(%edx),%mm6
pfmul %mm6,%mm5
movd 28(%esi),%mm6
punpckldq 40(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,896(%ebx)
psrlq $32,%mm5
movd %mm5,1280(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+28,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 136(%edx),%mm6
punpckldq 76(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,64(%ecx)
psrlq $32,%mm5
movd %mm5,4(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 4(%edx),%mm6
punpckldq 64(%edx),%mm6
pfmul %mm6,%mm5
movd 4(%esi),%mm6
punpckldq 64(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,128(%ebx)
psrlq $32,%mm5
movd %mm5,2048(%ebx)
movq 8(%eax),%mm2
movd ASM_NAME(COS9)+20,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
pfsub %mm0,%mm2
movq 40(%eax),%mm3
movd ASM_NAME(COS9)+28,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfsub %mm3,%mm2
movq 56(%eax),%mm3
movd ASM_NAME(COS9)+4,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq (%eax),%mm3
movq 16(%eax),%mm4
movd ASM_NAME(COS9)+32,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
movq 32(%eax),%mm4
movd ASM_NAME(COS9)+8,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
pfadd %mm1,%mm3
movq 64(%eax),%mm4
movd ASM_NAME(COS9)+16,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+8,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 116(%edx),%mm6
punpckldq 96(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,44(%ecx)
psrlq $32,%mm5
movd %mm5,24(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 24(%edx),%mm6
punpckldq 44(%edx),%mm6
pfmul %mm6,%mm5
movd 24(%esi),%mm6
punpckldq 44(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,768(%ebx)
psrlq $32,%mm5
movd %mm5,1408(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+24,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 132(%edx),%mm6
punpckldq 80(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,60(%ecx)
psrlq $32,%mm5
movd %mm5,8(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 8(%edx),%mm6
punpckldq 60(%edx),%mm6
pfmul %mm6,%mm5
movd 8(%esi),%mm6
punpckldq 60(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,256(%ebx)
psrlq $32,%mm5
movd %mm5,1920(%ebx)
movq 8(%eax),%mm2
movd ASM_NAME(COS9)+28,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
pfsub %mm0,%mm2
movq 40(%eax),%mm3
movd ASM_NAME(COS9)+4,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq 56(%eax),%mm3
movd ASM_NAME(COS9)+20,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfsub %mm3,%mm2
movq (%eax),%mm3
movq 16(%eax),%mm4
movd ASM_NAME(COS9)+16,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
movq 32(%eax),%mm4
movd ASM_NAME(COS9)+32,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
pfadd %mm1,%mm3
movq 64(%eax),%mm4
movd ASM_NAME(COS9)+8,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+12,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 120(%edx),%mm6
punpckldq 92(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,48(%ecx)
psrlq $32,%mm5
movd %mm5,20(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 20(%edx),%mm6
punpckldq 48(%edx),%mm6
pfmul %mm6,%mm5
movd 20(%esi),%mm6
punpckldq 48(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,640(%ebx)
psrlq $32,%mm5
movd %mm5,1536(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+20,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 128(%edx),%mm6
punpckldq 84(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,56(%ecx)
psrlq $32,%mm5
movd %mm5,12(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 12(%edx),%mm6
punpckldq 56(%edx),%mm6
pfmul %mm6,%mm5
movd 12(%esi),%mm6
punpckldq 56(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,384(%ebx)
psrlq $32,%mm5
movd %mm5,1792(%ebx)
movq (%eax),%mm4
movq 16(%eax),%mm3
pfsub %mm3,%mm4
movq 32(%eax),%mm3
pfadd %mm3,%mm4
movq 48(%eax),%mm3
pfsub %mm3,%mm4
movq 64(%eax),%mm3
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+16,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 124(%edx),%mm6
punpckldq 88(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,52(%ecx)
psrlq $32,%mm5
movd %mm5,16(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 16(%edx),%mm6
punpckldq 52(%edx),%mm6
pfmul %mm6,%mm5
movd 16(%esi),%mm6
punpckldq 52(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,512(%ebx)
psrlq $32,%mm5
movd %mm5,1664(%ebx)
femms
popl %ebx
popl %esi
movl %ebp,%esp
popl %ebp
ret
NONEXEC_STACK

View file

@ -0,0 +1,512 @@
/*
dct36_3dnowext: extended 3DNow optimized DCT36
copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
Transformed back into standalone asm, with help of
gcc -S -DHAVE_CONFIG_H -I. -march=k6-3 -O3 -Wall -pedantic -fno-strict-aliasing -DREAL_IS_FLOAT -c -o dct36_3dnowext.{S,c}
MPlayer comment follows.
*/
/*
* dct36_3dnow.c - 3DNow! optimized dct36()
*
* This code based 'dct36_3dnow.s' by Syuuhei Kashiyama
* <squash@mb.kcom.ne.jp>, only two types of changes have been made:
*
* - removed PREFETCH instruction for speedup
* - changed function name for support 3DNow! automatic detection
*
* You can find Kashiyama's original 3dnow! support patch
* (for mpg123-0.59o) at
* http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese).
*
* by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1999
* <kim@comtec.co.jp> - after 1.Apr.1999
*
* Modified for use with MPlayer, for details see the changelog at
* http://svn.mplayerhq.hu/mplayer/trunk/
* $Id: dct36_3dnow.c 18786 2006-06-22 13:34:00Z diego $
*
* Original disclaimer:
* The author of this program disclaim whole expressed or implied
* warranties with regard to this program, and in no event shall the
* author of this program liable to whatever resulted from the use of
* this program. Use it at your own risk.
*
* 2003/06/21: Moved to GCC inline assembly - Alex Beregszaszi
*/
#include "mangle.h"
.text
ALIGN32
.globl ASM_NAME(dct36_3dnowext)
/* .type ASM_NAME(dct36_3dnowext), @function */
ASM_NAME(dct36_3dnowext):
pushl %ebp
movl %esp, %ebp
pushl %esi
pushl %ebx
movl 8(%ebp), %eax
movl 12(%ebp), %esi
movl 16(%ebp), %ecx
movl 20(%ebp), %edx
movl 24(%ebp), %ebx
/* APP */
movq (%eax),%mm0
movq 4(%eax),%mm1
pfadd %mm1,%mm0
movq %mm0,4(%eax)
psrlq $32,%mm1
movq 12(%eax),%mm2
punpckldq %mm2,%mm1
pfadd %mm2,%mm1
movq %mm1,12(%eax)
psrlq $32,%mm2
movq 20(%eax),%mm3
punpckldq %mm3,%mm2
pfadd %mm3,%mm2
movq %mm2,20(%eax)
psrlq $32,%mm3
movq 28(%eax),%mm4
punpckldq %mm4,%mm3
pfadd %mm4,%mm3
movq %mm3,28(%eax)
psrlq $32,%mm4
movq 36(%eax),%mm5
punpckldq %mm5,%mm4
pfadd %mm5,%mm4
movq %mm4,36(%eax)
psrlq $32,%mm5
movq 44(%eax),%mm6
punpckldq %mm6,%mm5
pfadd %mm6,%mm5
movq %mm5,44(%eax)
psrlq $32,%mm6
movq 52(%eax),%mm7
punpckldq %mm7,%mm6
pfadd %mm7,%mm6
movq %mm6,52(%eax)
psrlq $32,%mm7
movq 60(%eax),%mm0
punpckldq %mm0,%mm7
pfadd %mm0,%mm7
movq %mm7,60(%eax)
psrlq $32,%mm0
movd 68(%eax),%mm1
pfadd %mm1,%mm0
movd %mm0,68(%eax)
movd 4(%eax),%mm0
movd 12(%eax),%mm1
punpckldq %mm1,%mm0
punpckldq 20(%eax),%mm1
pfadd %mm1,%mm0
movd %mm0,12(%eax)
psrlq $32,%mm0
movd %mm0,20(%eax)
psrlq $32,%mm1
movd 28(%eax),%mm2
punpckldq %mm2,%mm1
punpckldq 36(%eax),%mm2
pfadd %mm2,%mm1
movd %mm1,28(%eax)
psrlq $32,%mm1
movd %mm1,36(%eax)
psrlq $32,%mm2
movd 44(%eax),%mm3
punpckldq %mm3,%mm2
punpckldq 52(%eax),%mm3
pfadd %mm3,%mm2
movd %mm2,44(%eax)
psrlq $32,%mm2
movd %mm2,52(%eax)
psrlq $32,%mm3
movd 60(%eax),%mm4
punpckldq %mm4,%mm3
punpckldq 68(%eax),%mm4
pfadd %mm4,%mm3
movd %mm3,60(%eax)
psrlq $32,%mm3
movd %mm3,68(%eax)
movq 24(%eax),%mm0
movq 48(%eax),%mm1
movd ASM_NAME(COS9)+12,%mm2
punpckldq %mm2,%mm2
movd ASM_NAME(COS9)+24,%mm3
punpckldq %mm3,%mm3
pfmul %mm2,%mm0
pfmul %mm3,%mm1
pushl %eax
movl $1,%eax
movd %eax,%mm7
pi2fd %mm7,%mm7
popl %eax
movq 8(%eax),%mm2
movd ASM_NAME(COS9)+4,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
pfadd %mm0,%mm2
movq 40(%eax),%mm3
movd ASM_NAME(COS9)+20,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq 56(%eax),%mm3
movd ASM_NAME(COS9)+28,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq (%eax),%mm3
movq 16(%eax),%mm4
movd ASM_NAME(COS9)+8,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
movq 32(%eax),%mm4
movd ASM_NAME(COS9)+16,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
pfadd %mm1,%mm3
movq 64(%eax),%mm4
movd ASM_NAME(COS9)+32,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+0,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 108(%edx),%mm6
punpckldq 104(%edx),%mm6
pfmul %mm6,%mm5
pswapd %mm5,%mm5
movq %mm5,32(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 32(%edx),%mm6
punpckldq 36(%edx),%mm6
pfmul %mm6,%mm5
movd 32(%esi),%mm6
punpckldq 36(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,1024(%ebx)
psrlq $32,%mm5
movd %mm5,1152(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+32,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 140(%edx),%mm6
punpckldq 72(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,68(%ecx)
psrlq $32,%mm5
movd %mm5,0(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 0(%edx),%mm6
punpckldq 68(%edx),%mm6
pfmul %mm6,%mm5
movd 0(%esi),%mm6
punpckldq 68(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,0(%ebx)
psrlq $32,%mm5
movd %mm5,2176(%ebx)
movq 8(%eax),%mm2
movq 40(%eax),%mm3
pfsub %mm3,%mm2
movq 56(%eax),%mm3
pfsub %mm3,%mm2
movd ASM_NAME(COS9)+12,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
movq 16(%eax),%mm3
movq 32(%eax),%mm4
pfsub %mm4,%mm3
movq 64(%eax),%mm4
pfsub %mm4,%mm3
movd ASM_NAME(COS9)+24,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
movq 48(%eax),%mm4
pfsub %mm4,%mm3
movq (%eax),%mm4
pfadd %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+4,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 112(%edx),%mm6
punpckldq 100(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,40(%ecx)
psrlq $32,%mm5
movd %mm5,28(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 28(%edx),%mm6
punpckldq 40(%edx),%mm6
pfmul %mm6,%mm5
movd 28(%esi),%mm6
punpckldq 40(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,896(%ebx)
psrlq $32,%mm5
movd %mm5,1280(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+28,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 136(%edx),%mm6
punpckldq 76(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,64(%ecx)
psrlq $32,%mm5
movd %mm5,4(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 4(%edx),%mm6
punpckldq 64(%edx),%mm6
pfmul %mm6,%mm5
movd 4(%esi),%mm6
punpckldq 64(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,128(%ebx)
psrlq $32,%mm5
movd %mm5,2048(%ebx)
movq 8(%eax),%mm2
movd ASM_NAME(COS9)+20,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
pfsub %mm0,%mm2
movq 40(%eax),%mm3
movd ASM_NAME(COS9)+28,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfsub %mm3,%mm2
movq 56(%eax),%mm3
movd ASM_NAME(COS9)+4,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq (%eax),%mm3
movq 16(%eax),%mm4
movd ASM_NAME(COS9)+32,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
movq 32(%eax),%mm4
movd ASM_NAME(COS9)+8,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
pfadd %mm1,%mm3
movq 64(%eax),%mm4
movd ASM_NAME(COS9)+16,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+8,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 116(%edx),%mm6
punpckldq 96(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,44(%ecx)
psrlq $32,%mm5
movd %mm5,24(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 24(%edx),%mm6
punpckldq 44(%edx),%mm6
pfmul %mm6,%mm5
movd 24(%esi),%mm6
punpckldq 44(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,768(%ebx)
psrlq $32,%mm5
movd %mm5,1408(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+24,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 132(%edx),%mm6
punpckldq 80(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,60(%ecx)
psrlq $32,%mm5
movd %mm5,8(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 8(%edx),%mm6
punpckldq 60(%edx),%mm6
pfmul %mm6,%mm5
movd 8(%esi),%mm6
punpckldq 60(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,256(%ebx)
psrlq $32,%mm5
movd %mm5,1920(%ebx)
movq 8(%eax),%mm2
movd ASM_NAME(COS9)+28,%mm3
punpckldq %mm3,%mm3
pfmul %mm3,%mm2
pfsub %mm0,%mm2
movq 40(%eax),%mm3
movd ASM_NAME(COS9)+4,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfadd %mm3,%mm2
movq 56(%eax),%mm3
movd ASM_NAME(COS9)+20,%mm4
punpckldq %mm4,%mm4
pfmul %mm4,%mm3
pfsub %mm3,%mm2
movq (%eax),%mm3
movq 16(%eax),%mm4
movd ASM_NAME(COS9)+16,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
movq 32(%eax),%mm4
movd ASM_NAME(COS9)+32,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfadd %mm4,%mm3
pfadd %mm1,%mm3
movq 64(%eax),%mm4
movd ASM_NAME(COS9)+8,%mm5
punpckldq %mm5,%mm5
pfmul %mm5,%mm4
pfsub %mm4,%mm3
movq %mm2,%mm4
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+12,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 120(%edx),%mm6
punpckldq 92(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,48(%ecx)
psrlq $32,%mm5
movd %mm5,20(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 20(%edx),%mm6
punpckldq 48(%edx),%mm6
pfmul %mm6,%mm5
movd 20(%esi),%mm6
punpckldq 48(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,640(%ebx)
psrlq $32,%mm5
movd %mm5,1536(%ebx)
movq %mm3,%mm4
pfsub %mm2,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+20,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 128(%edx),%mm6
punpckldq 84(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,56(%ecx)
psrlq $32,%mm5
movd %mm5,12(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 12(%edx),%mm6
punpckldq 56(%edx),%mm6
pfmul %mm6,%mm5
movd 12(%esi),%mm6
punpckldq 56(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,384(%ebx)
psrlq $32,%mm5
movd %mm5,1792(%ebx)
movq (%eax),%mm4
movq 16(%eax),%mm3
pfsub %mm3,%mm4
movq 32(%eax),%mm3
pfadd %mm3,%mm4
movq 48(%eax),%mm3
pfsub %mm3,%mm4
movq 64(%eax),%mm3
pfadd %mm3,%mm4
movq %mm7,%mm5
punpckldq ASM_NAME(tfcos36)+16,%mm5
pfmul %mm5,%mm4
movq %mm4,%mm5
pfacc %mm5,%mm5
movd 124(%edx),%mm6
punpckldq 88(%edx),%mm6
pfmul %mm6,%mm5
movd %mm5,52(%ecx)
psrlq $32,%mm5
movd %mm5,16(%ecx)
movq %mm4,%mm6
punpckldq %mm6,%mm5
pfsub %mm6,%mm5
punpckhdq %mm5,%mm5
movd 16(%edx),%mm6
punpckldq 52(%edx),%mm6
pfmul %mm6,%mm5
movd 16(%esi),%mm6
punpckldq 52(%esi),%mm6
pfadd %mm6,%mm5
movd %mm5,512(%ebx)
psrlq $32,%mm5
movd %mm5,1664(%ebx)
femms
/* NO_APP */
popl %ebx
popl %esi
leave
ret
/* .size ASM_NAME(dct36_3dnowext), .-ASM_NAME(dct36_3dnowext) */
NONEXEC_STACK

View file

@ -0,0 +1,174 @@
/*
dct64.c: DCT64, the plain C version
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Michael Hipp
*/
/*
* Discrete Cosine Tansform (DCT) for subband synthesis
*
* -funroll-loops (for gcc) will remove the loops for better performance
* using loops in the source-code enhances readabillity
*
*
* TODO: write an optimized version for the down-sampling modes
* (in these modes the bands 16-31 (2:1) or 8-31 (4:1) are zero
*/
#include "mpg123lib_intern.h"
void dct64(real *out0,real *out1,real *samples)
{
real bufs[64];
{
register int i,j;
register real *b1,*b2,*bs,*costab;
b1 = samples;
bs = bufs;
costab = pnts[0]+16;
b2 = b1 + 32;
for(i=15;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=15;i>=0;i--)
*bs++ = REAL_MUL((*--b2 - *b1++), *--costab);
b1 = bufs;
costab = pnts[1]+8;
b2 = b1 + 16;
{
for(i=7;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=7;i>=0;i--)
*bs++ = REAL_MUL((*--b2 - *b1++), *--costab);
b2 += 32;
costab += 8;
for(i=7;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=7;i>=0;i--)
*bs++ = REAL_MUL((*b1++ - *--b2), *--costab);
b2 += 32;
}
bs = bufs;
costab = pnts[2];
b2 = b1 + 8;
for(j=2;j;j--)
{
for(i=3;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=3;i>=0;i--)
*bs++ = REAL_MUL((*--b2 - *b1++), costab[i]);
b2 += 16;
for(i=3;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=3;i>=0;i--)
*bs++ = REAL_MUL((*b1++ - *--b2), costab[i]);
b2 += 16;
}
b1 = bufs;
costab = pnts[3];
b2 = b1 + 4;
for(j=4;j;j--)
{
*bs++ = (*b1++ + *--b2);
*bs++ = (*b1++ + *--b2);
*bs++ = REAL_MUL((*--b2 - *b1++), costab[1]);
*bs++ = REAL_MUL((*--b2 - *b1++), costab[0]);
b2 += 8;
*bs++ = (*b1++ + *--b2);
*bs++ = (*b1++ + *--b2);
*bs++ = REAL_MUL((*b1++ - *--b2), costab[1]);
*bs++ = REAL_MUL((*b1++ - *--b2), costab[0]);
b2 += 8;
}
bs = bufs;
costab = pnts[4];
for(j=8;j;j--)
{
real v0,v1;
v0=*b1++; v1 = *b1++;
*bs++ = (v0 + v1);
*bs++ = REAL_MUL((v0 - v1), (*costab));
v0=*b1++; v1 = *b1++;
*bs++ = (v0 + v1);
*bs++ = REAL_MUL((v1 - v0), (*costab));
}
}
{
register real *b1;
register int i;
for(b1=bufs,i=8;i;i--,b1+=4)
b1[2] += b1[3];
for(b1=bufs,i=4;i;i--,b1+=8)
{
b1[4] += b1[6];
b1[6] += b1[5];
b1[5] += b1[7];
}
for(b1=bufs,i=2;i;i--,b1+=16)
{
b1[8] += b1[12];
b1[12] += b1[10];
b1[10] += b1[14];
b1[14] += b1[9];
b1[9] += b1[13];
b1[13] += b1[11];
b1[11] += b1[15];
}
}
out0[0x10*16] = REAL_SCALE_DCT64(bufs[0]);
out0[0x10*15] = REAL_SCALE_DCT64(bufs[16+0] + bufs[16+8]);
out0[0x10*14] = REAL_SCALE_DCT64(bufs[8]);
out0[0x10*13] = REAL_SCALE_DCT64(bufs[16+8] + bufs[16+4]);
out0[0x10*12] = REAL_SCALE_DCT64(bufs[4]);
out0[0x10*11] = REAL_SCALE_DCT64(bufs[16+4] + bufs[16+12]);
out0[0x10*10] = REAL_SCALE_DCT64(bufs[12]);
out0[0x10* 9] = REAL_SCALE_DCT64(bufs[16+12] + bufs[16+2]);
out0[0x10* 8] = REAL_SCALE_DCT64(bufs[2]);
out0[0x10* 7] = REAL_SCALE_DCT64(bufs[16+2] + bufs[16+10]);
out0[0x10* 6] = REAL_SCALE_DCT64(bufs[10]);
out0[0x10* 5] = REAL_SCALE_DCT64(bufs[16+10] + bufs[16+6]);
out0[0x10* 4] = REAL_SCALE_DCT64(bufs[6]);
out0[0x10* 3] = REAL_SCALE_DCT64(bufs[16+6] + bufs[16+14]);
out0[0x10* 2] = REAL_SCALE_DCT64(bufs[14]);
out0[0x10* 1] = REAL_SCALE_DCT64(bufs[16+14] + bufs[16+1]);
out0[0x10* 0] = REAL_SCALE_DCT64(bufs[1]);
out1[0x10* 0] = REAL_SCALE_DCT64(bufs[1]);
out1[0x10* 1] = REAL_SCALE_DCT64(bufs[16+1] + bufs[16+9]);
out1[0x10* 2] = REAL_SCALE_DCT64(bufs[9]);
out1[0x10* 3] = REAL_SCALE_DCT64(bufs[16+9] + bufs[16+5]);
out1[0x10* 4] = REAL_SCALE_DCT64(bufs[5]);
out1[0x10* 5] = REAL_SCALE_DCT64(bufs[16+5] + bufs[16+13]);
out1[0x10* 6] = REAL_SCALE_DCT64(bufs[13]);
out1[0x10* 7] = REAL_SCALE_DCT64(bufs[16+13] + bufs[16+3]);
out1[0x10* 8] = REAL_SCALE_DCT64(bufs[3]);
out1[0x10* 9] = REAL_SCALE_DCT64(bufs[16+3] + bufs[16+11]);
out1[0x10*10] = REAL_SCALE_DCT64(bufs[11]);
out1[0x10*11] = REAL_SCALE_DCT64(bufs[16+11] + bufs[16+7]);
out1[0x10*12] = REAL_SCALE_DCT64(bufs[7]);
out1[0x10*13] = REAL_SCALE_DCT64(bufs[16+7] + bufs[16+15]);
out1[0x10*14] = REAL_SCALE_DCT64(bufs[15]);
out1[0x10*15] = REAL_SCALE_DCT64(bufs[16+15]);
}

View file

@ -0,0 +1,712 @@
/*
dct64_3dnow.s: Replacement of dct64() with AMD's 3DNow! SIMD operations support
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by Syuuhei Kashiyama
Original "license" statement:
The author of this program disclaim whole expressed or implied
warranties with regard to this program, and in no event shall the
author of this program liable to whatever resulted from the use of
this program. Use it at your own risk.
*/
#include "mangle.h"
.globl ASM_NAME(dct64_3dnow)
/* .type ASM_NAME(dct64_3dnow),@function */
ASM_NAME(dct64_3dnow):
subl $256,%esp
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
leal 16(%esp),%ebx
movl 284(%esp),%edi
movl 276(%esp),%ebp
movl 280(%esp),%edx
leal 128(%ebx),%esi
/* femms */
/* 1 */
movl ASM_NAME(pnts),%eax
movq 0(%edi),%mm0
movq %mm0,%mm1
movd 124(%edi),%mm2
punpckldq 120(%edi),%mm2
movq 0(%eax),%mm3
pfadd %mm2,%mm0
movq %mm0,0(%ebx)
pfsub %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,124(%ebx)
psrlq $32,%mm1
movd %mm1,120(%ebx)
movq 8(%edi),%mm4
movq %mm4,%mm5
movd 116(%edi),%mm6
punpckldq 112(%edi),%mm6
movq 8(%eax),%mm7
pfadd %mm6,%mm4
movq %mm4,8(%ebx)
pfsub %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,116(%ebx)
psrlq $32,%mm5
movd %mm5,112(%ebx)
movq 16(%edi),%mm0
movq %mm0,%mm1
movd 108(%edi),%mm2
punpckldq 104(%edi),%mm2
movq 16(%eax),%mm3
pfadd %mm2,%mm0
movq %mm0,16(%ebx)
pfsub %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,108(%ebx)
psrlq $32,%mm1
movd %mm1,104(%ebx)
movq 24(%edi),%mm4
movq %mm4,%mm5
movd 100(%edi),%mm6
punpckldq 96(%edi),%mm6
movq 24(%eax),%mm7
pfadd %mm6,%mm4
movq %mm4,24(%ebx)
pfsub %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,100(%ebx)
psrlq $32,%mm5
movd %mm5,96(%ebx)
movq 32(%edi),%mm0
movq %mm0,%mm1
movd 92(%edi),%mm2
punpckldq 88(%edi),%mm2
movq 32(%eax),%mm3
pfadd %mm2,%mm0
movq %mm0,32(%ebx)
pfsub %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,92(%ebx)
psrlq $32,%mm1
movd %mm1,88(%ebx)
movq 40(%edi),%mm4
movq %mm4,%mm5
movd 84(%edi),%mm6
punpckldq 80(%edi),%mm6
movq 40(%eax),%mm7
pfadd %mm6,%mm4
movq %mm4,40(%ebx)
pfsub %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,84(%ebx)
psrlq $32,%mm5
movd %mm5,80(%ebx)
movq 48(%edi),%mm0
movq %mm0,%mm1
movd 76(%edi),%mm2
punpckldq 72(%edi),%mm2
movq 48(%eax),%mm3
pfadd %mm2,%mm0
movq %mm0,48(%ebx)
pfsub %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,76(%ebx)
psrlq $32,%mm1
movd %mm1,72(%ebx)
movq 56(%edi),%mm4
movq %mm4,%mm5
movd 68(%edi),%mm6
punpckldq 64(%edi),%mm6
movq 56(%eax),%mm7
pfadd %mm6,%mm4
movq %mm4,56(%ebx)
pfsub %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,68(%ebx)
psrlq $32,%mm5
movd %mm5,64(%ebx)
/* 2 */
movl ASM_NAME(pnts)+4,%eax
/* 0,14 */
movq 0(%ebx),%mm0
movq %mm0,%mm1
movd 60(%ebx),%mm2
punpckldq 56(%ebx),%mm2
movq 0(%eax),%mm3
pfadd %mm2,%mm0
movq %mm0,0(%esi)
pfsub %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,60(%esi)
psrlq $32,%mm1
movd %mm1,56(%esi)
/* 16,30 */
movq 64(%ebx),%mm0
movq %mm0,%mm1
movd 124(%ebx),%mm2
punpckldq 120(%ebx),%mm2
pfadd %mm2,%mm0
movq %mm0,64(%esi)
pfsubr %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,124(%esi)
psrlq $32,%mm1
movd %mm1,120(%esi)
/* 2,12 */
movq 8(%ebx),%mm4
movq %mm4,%mm5
movd 52(%ebx),%mm6
punpckldq 48(%ebx),%mm6
movq 8(%eax),%mm7
pfadd %mm6,%mm4
movq %mm4,8(%esi)
pfsub %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,52(%esi)
psrlq $32,%mm5
movd %mm5,48(%esi)
/* 18,28 */
movq 72(%ebx),%mm4
movq %mm4,%mm5
movd 116(%ebx),%mm6
punpckldq 112(%ebx),%mm6
pfadd %mm6,%mm4
movq %mm4,72(%esi)
pfsubr %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,116(%esi)
psrlq $32,%mm5
movd %mm5,112(%esi)
/* 4,10 */
movq 16(%ebx),%mm0
movq %mm0,%mm1
movd 44(%ebx),%mm2
punpckldq 40(%ebx),%mm2
movq 16(%eax),%mm3
pfadd %mm2,%mm0
movq %mm0,16(%esi)
pfsub %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,44(%esi)
psrlq $32,%mm1
movd %mm1,40(%esi)
/* 20,26 */
movq 80(%ebx),%mm0
movq %mm0,%mm1
movd 108(%ebx),%mm2
punpckldq 104(%ebx),%mm2
pfadd %mm2,%mm0
movq %mm0,80(%esi)
pfsubr %mm2,%mm1
pfmul %mm3,%mm1
movd %mm1,108(%esi)
psrlq $32,%mm1
movd %mm1,104(%esi)
/* 6,8 */
movq 24(%ebx),%mm4
movq %mm4,%mm5
movd 36(%ebx),%mm6
punpckldq 32(%ebx),%mm6
movq 24(%eax),%mm7
pfadd %mm6,%mm4
movq %mm4,24(%esi)
pfsub %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,36(%esi)
psrlq $32,%mm5
movd %mm5,32(%esi)
/* 22,24 */
movq 88(%ebx),%mm4
movq %mm4,%mm5
movd 100(%ebx),%mm6
punpckldq 96(%ebx),%mm6
pfadd %mm6,%mm4
movq %mm4,88(%esi)
pfsubr %mm6,%mm5
pfmul %mm7,%mm5
movd %mm5,100(%esi)
psrlq $32,%mm5
movd %mm5,96(%esi)
/* 3 */
movl ASM_NAME(pnts)+8,%eax
movq 0(%eax),%mm0
movq 8(%eax),%mm1
/* 0,6 */
movq 0(%esi),%mm2
movq %mm2,%mm3
movd 28(%esi),%mm4
punpckldq 24(%esi),%mm4
pfadd %mm4,%mm2
pfsub %mm4,%mm3
pfmul %mm0,%mm3
movq %mm2,0(%ebx)
movd %mm3,28(%ebx)
psrlq $32,%mm3
movd %mm3,24(%ebx)
/* 2,4 */
movq 8(%esi),%mm5
movq %mm5,%mm6
movd 20(%esi),%mm7
punpckldq 16(%esi),%mm7
pfadd %mm7,%mm5
pfsub %mm7,%mm6
pfmul %mm1,%mm6
movq %mm5,8(%ebx)
movd %mm6,20(%ebx)
psrlq $32,%mm6
movd %mm6,16(%ebx)
/* 8,14 */
movq 32(%esi),%mm2
movq %mm2,%mm3
movd 60(%esi),%mm4
punpckldq 56(%esi),%mm4
pfadd %mm4,%mm2
pfsubr %mm4,%mm3
pfmul %mm0,%mm3
movq %mm2,32(%ebx)
movd %mm3,60(%ebx)
psrlq $32,%mm3
movd %mm3,56(%ebx)
/* 10,12 */
movq 40(%esi),%mm5
movq %mm5,%mm6
movd 52(%esi),%mm7
punpckldq 48(%esi),%mm7
pfadd %mm7,%mm5
pfsubr %mm7,%mm6
pfmul %mm1,%mm6
movq %mm5,40(%ebx)
movd %mm6,52(%ebx)
psrlq $32,%mm6
movd %mm6,48(%ebx)
/* 16,22 */
movq 64(%esi),%mm2
movq %mm2,%mm3
movd 92(%esi),%mm4
punpckldq 88(%esi),%mm4
pfadd %mm4,%mm2
pfsub %mm4,%mm3
pfmul %mm0,%mm3
movq %mm2,64(%ebx)
movd %mm3,92(%ebx)
psrlq $32,%mm3
movd %mm3,88(%ebx)
/* 18,20 */
movq 72(%esi),%mm5
movq %mm5,%mm6
movd 84(%esi),%mm7
punpckldq 80(%esi),%mm7
pfadd %mm7,%mm5
pfsub %mm7,%mm6
pfmul %mm1,%mm6
movq %mm5,72(%ebx)
movd %mm6,84(%ebx)
psrlq $32,%mm6
movd %mm6,80(%ebx)
/* 24,30 */
movq 96(%esi),%mm2
movq %mm2,%mm3
movd 124(%esi),%mm4
punpckldq 120(%esi),%mm4
pfadd %mm4,%mm2
pfsubr %mm4,%mm3
pfmul %mm0,%mm3
movq %mm2,96(%ebx)
movd %mm3,124(%ebx)
psrlq $32,%mm3
movd %mm3,120(%ebx)
/* 26,28 */
movq 104(%esi),%mm5
movq %mm5,%mm6
movd 116(%esi),%mm7
punpckldq 112(%esi),%mm7
pfadd %mm7,%mm5
pfsubr %mm7,%mm6
pfmul %mm1,%mm6
movq %mm5,104(%ebx)
movd %mm6,116(%ebx)
psrlq $32,%mm6
movd %mm6,112(%ebx)
/* 4 */
movl ASM_NAME(pnts)+12,%eax
movq 0(%eax),%mm0
/* 0 */
movq 0(%ebx),%mm1
movq %mm1,%mm2
movd 12(%ebx),%mm3
punpckldq 8(%ebx),%mm3
pfadd %mm3,%mm1
pfsub %mm3,%mm2
pfmul %mm0,%mm2
movq %mm1,0(%esi)
movd %mm2,12(%esi)
psrlq $32,%mm2
movd %mm2,8(%esi)
/* 4 */
movq 16(%ebx),%mm4
movq %mm4,%mm5
movd 28(%ebx),%mm6
punpckldq 24(%ebx),%mm6
pfadd %mm6,%mm4
pfsubr %mm6,%mm5
pfmul %mm0,%mm5
movq %mm4,16(%esi)
movd %mm5,28(%esi)
psrlq $32,%mm5
movd %mm5,24(%esi)
/* 8 */
movq 32(%ebx),%mm1
movq %mm1,%mm2
movd 44(%ebx),%mm3
punpckldq 40(%ebx),%mm3
pfadd %mm3,%mm1
pfsub %mm3,%mm2
pfmul %mm0,%mm2
movq %mm1,32(%esi)
movd %mm2,44(%esi)
psrlq $32,%mm2
movd %mm2,40(%esi)
/* 12 */
movq 48(%ebx),%mm4
movq %mm4,%mm5
movd 60(%ebx),%mm6
punpckldq 56(%ebx),%mm6
pfadd %mm6,%mm4
pfsubr %mm6,%mm5
pfmul %mm0,%mm5
movq %mm4,48(%esi)
movd %mm5,60(%esi)
psrlq $32,%mm5
movd %mm5,56(%esi)
/* 16 */
movq 64(%ebx),%mm1
movq %mm1,%mm2
movd 76(%ebx),%mm3
punpckldq 72(%ebx),%mm3
pfadd %mm3,%mm1
pfsub %mm3,%mm2
pfmul %mm0,%mm2
movq %mm1,64(%esi)
movd %mm2,76(%esi)
psrlq $32,%mm2
movd %mm2,72(%esi)
/* 20 */
movq 80(%ebx),%mm4
movq %mm4,%mm5
movd 92(%ebx),%mm6
punpckldq 88(%ebx),%mm6
pfadd %mm6,%mm4
pfsubr %mm6,%mm5
pfmul %mm0,%mm5
movq %mm4,80(%esi)
movd %mm5,92(%esi)
psrlq $32,%mm5
movd %mm5,88(%esi)
/* 24 */
movq 96(%ebx),%mm1
movq %mm1,%mm2
movd 108(%ebx),%mm3
punpckldq 104(%ebx),%mm3
pfadd %mm3,%mm1
pfsub %mm3,%mm2
pfmul %mm0,%mm2
movq %mm1,96(%esi)
movd %mm2,108(%esi)
psrlq $32,%mm2
movd %mm2,104(%esi)
/* 28 */
movq 112(%ebx),%mm4
movq %mm4,%mm5
movd 124(%ebx),%mm6
punpckldq 120(%ebx),%mm6
pfadd %mm6,%mm4
pfsubr %mm6,%mm5
pfmul %mm0,%mm5
movq %mm4,112(%esi)
movd %mm5,124(%esi)
psrlq $32,%mm5
movd %mm5,120(%esi)
/* 5 */
movl $-1,%eax
movd %eax,%mm1
movl $1,%eax
/* L | H */
movd %eax,%mm0
punpckldq %mm1,%mm0
/* 1.0 | -1.0 */
pi2fd %mm0,%mm0
movd %eax,%mm1
pi2fd %mm1,%mm1
movl ASM_NAME(pnts)+16,%eax
movd 0(%eax),%mm2
/* 1.0 | cos0 */
punpckldq %mm2,%mm1
/* 0 */
movq 0(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq %mm2,0(%ebx)
movq 8(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm4,8(%ebx)
/* 4 */
movq 16(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq 24(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm2,%mm3
psrlq $32,%mm3
pfadd %mm4,%mm2
pfadd %mm3,%mm4
movq %mm2,16(%ebx)
movq %mm4,24(%ebx)
/* 8 */
movq 32(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq %mm2,32(%ebx)
movq 40(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm4,40(%ebx)
/* 12 */
movq 48(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq 56(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm2,%mm3
psrlq $32,%mm3
pfadd %mm4,%mm2
pfadd %mm3,%mm4
movq %mm2,48(%ebx)
movq %mm4,56(%ebx)
/* 16 */
movq 64(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq %mm2,64(%ebx)
movq 72(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm4,72(%ebx)
/* 20 */
movq 80(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq 88(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm2,%mm3
psrlq $32,%mm3
pfadd %mm4,%mm2
pfadd %mm3,%mm4
movq %mm2,80(%ebx)
movq %mm4,88(%ebx)
/* 24 */
movq 96(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq %mm2,96(%ebx)
movq 104(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm4,104(%ebx)
/* 28 */
movq 112(%esi),%mm2
movq %mm2,%mm3
pfmul %mm0,%mm3
pfacc %mm3,%mm2
pfmul %mm1,%mm2
movq 120(%esi),%mm4
movq %mm4,%mm5
pfmul %mm0,%mm5
pfacc %mm5,%mm4
pfmul %mm0,%mm4
pfmul %mm1,%mm4
movq %mm4,%mm5
psrlq $32,%mm5
pfacc %mm5,%mm4
movq %mm2,%mm3
psrlq $32,%mm3
pfadd %mm4,%mm2
pfadd %mm3,%mm4
movq %mm2,112(%ebx)
movq %mm4,120(%ebx)
/* Phase6 */
movl 0(%ebx),%eax
movl %eax,1024(%ebp)
movl 4(%ebx),%eax
movl %eax,0(%ebp)
movl %eax,0(%edx)
movl 8(%ebx),%eax
movl %eax,512(%ebp)
movl 12(%ebx),%eax
movl %eax,512(%edx)
movl 16(%ebx),%eax
movl %eax,768(%ebp)
movl 20(%ebx),%eax
movl %eax,256(%edx)
movl 24(%ebx),%eax
movl %eax,256(%ebp)
movl 28(%ebx),%eax
movl %eax,768(%edx)
movq 32(%ebx),%mm0
movq 48(%ebx),%mm1
pfadd %mm1,%mm0
movd %mm0,896(%ebp)
psrlq $32,%mm0
movd %mm0,128(%edx)
movq 40(%ebx),%mm2
pfadd %mm2,%mm1
movd %mm1,640(%ebp)
psrlq $32,%mm1
movd %mm1,384(%edx)
movq 56(%ebx),%mm3
pfadd %mm3,%mm2
movd %mm2,384(%ebp)
psrlq $32,%mm2
movd %mm2,640(%edx)
movd 36(%ebx),%mm4
pfadd %mm4,%mm3
movd %mm3,128(%ebp)
psrlq $32,%mm3
movd %mm3,896(%edx)
movq 96(%ebx),%mm0
movq 64(%ebx),%mm1
movq 112(%ebx),%mm2
pfadd %mm2,%mm0
movq %mm0,%mm3
pfadd %mm1,%mm3
movd %mm3,960(%ebp)
psrlq $32,%mm3
movd %mm3,64(%edx)
movq 80(%ebx),%mm1
pfadd %mm1,%mm0
movd %mm0,832(%ebp)
psrlq $32,%mm0
movd %mm0,192(%edx)
movq 104(%ebx),%mm3
pfadd %mm3,%mm2
movq %mm2,%mm4
pfadd %mm1,%mm4
movd %mm4,704(%ebp)
psrlq $32,%mm4
movd %mm4,320(%edx)
movq 72(%ebx),%mm1
pfadd %mm1,%mm2
movd %mm2,576(%ebp)
psrlq $32,%mm2
movd %mm2,448(%edx)
movq 120(%ebx),%mm4
pfadd %mm4,%mm3
movq %mm3,%mm5
pfadd %mm1,%mm5
movd %mm5,448(%ebp)
psrlq $32,%mm5
movd %mm5,576(%edx)
movq 88(%ebx),%mm1
pfadd %mm1,%mm3
movd %mm3,320(%ebp)
psrlq $32,%mm3
movd %mm3,704(%edx)
movd 100(%ebx),%mm5
pfadd %mm5,%mm4
movq %mm4,%mm6
pfadd %mm1,%mm6
movd %mm6,192(%ebp)
psrlq $32,%mm6
movd %mm6,832(%edx)
movd 68(%ebx),%mm1
pfadd %mm1,%mm4
movd %mm4,64(%ebp)
psrlq $32,%mm4
movd %mm4,960(%edx)
/* femms */
popl %ebx
popl %esi
popl %edi
popl %ebp
addl $256,%esp
ret
NONEXEC_STACK

Some files were not shown because too many files have changed in this diff Show more