1
0
mirror of http://mpg123.de/trunk/.git synced 2025-10-29 14:09:21 +03:00
Commit Graph

2779 Commits

Author SHA1 Message Date
thor
89259f1b5c mpg123/term: no offset here
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4667 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-27 09:01:00 +00:00
thor
f9292ff1b3 mpg123: … and matching update to fix runtime pitching, bad resampler warning
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4666 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-27 08:54:05 +00:00
thor
01eb5efbd1 mpg123: some progress bar clearing
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4665 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-27 08:53:24 +00:00
thor
9dda9fbdfe mpg123/term control: more stat line clearing, for pitch and info printout
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4664 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-27 07:26:15 +00:00
thor
a44337e738 manpages, out123: sync documentation
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4663 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 19:16:08 +00:00
thor
8e8da9974c mpg123: Revamped audio output logic for resampling and pitching.
Now the integration of the libsyn123 resampler and handling of the
NtoM decoder are hopefully correct in the again-enlarged audio.c,
which became a hollow shell with the advent of libout123, and now
is strong again.

Settling decoder and output formats has historically been the most
confusing aspect of libmpg123 and I raise that with the integration
of post-decoder resampling and pitching in the decoder, in the
output device, or in said resampling between these two. Insanity!

The new resampler is the default for forcing output rates now. If
you wonder why, try this in the current mpg123 source tree with
your fresh build:

for resampler in ntom dirty fine
do
  src/mpg123 -r 22040 --resample $resampler --pitch -0.72 \
    src/tests/sweep.mp3
done

With a pure sine sweep like that (generated via out123), you
can appreciate

a) the quality differences between resamplers, and
b) how little those seem to matter when you just listen
   to music.

Really, without a detailed comparison and some noisy pop/rock
music, it is surprisingly hard to tell how bad the drop-sample
resampling of the NtoM decoder really is.

But this has a price: Even when I took great pains in designing
the syn123 resampler, it needs more computing time than the
MPEG decoder itself. That's life. You can make resamplers that
are faster, but at the cost of increased latency which makes
programming tedious. Here, I just ignored that aspect, as the
syn123 resampling latency is just a handful of samples, well
below the farts you get from ALSA on closing a device.




git-svn-id: svn://scm.orgis.org/mpg123/trunk@4662 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 16:33:28 +00:00
thor
01ea1fb42d libout123: formatting
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4661 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 16:00:46 +00:00
thor
b4b9ae8d1e libout123: actually fix writing in smallel blocks
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4660 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 16:00:09 +00:00
thor
6fb3d326bc getlopt: proper NULL
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4659 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 14:34:42 +00:00
thor
8f49ba2b3b out123: adapt to getlopt changes
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4658 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 14:13:28 +00:00
thor
cd793ecebd getlopt: Machinery to avoid leaking strdup() memory.
Hm, why are we using strdup, anyway?



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4657 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 14:04:33 +00:00
thor
5729b3092c libout123: API v3
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4656 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 12:57:50 +00:00
thor
0b72b870fb libout123: limit write block to 16K
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4655 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 12:56:12 +00:00
thor
17168060ed mpg123: do not keep DEBUG in trunk
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4654 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 12:45:11 +00:00
thor
4c68f31c13 mpg123: that's not 16K'
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4653 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-26 12:44:22 +00:00
thor
fe46284681 libmpg123: MPG123_FLOAT_FALLBACK needs a value!
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4652 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 18:06:28 +00:00
thor
448fd30b2c mpg123: Use downsampled decoding as precursor to further downsampling.
The quality of 2to1 and 4to1 decoding is good and it even saves work.
Win-win.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4651 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 17:40:57 +00:00
thor
44fc720645 libmpg123: promise that rates are ascending
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4650 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 17:37:24 +00:00
thor
fff5148bab libmpg123, mpg123: reworked format choice logic to better support resampling
This is about preventing unnecessary work where the downsampling in
libmpg123 (factor 2 or 4) can be used. The external resampler is
only called when we would have to resort to NtoM decoding.

A major change is that libmpg123 now considers floating point encoding
by itself, at all.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4649 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 16:58:09 +00:00
thor
35ea813aa2 mpg123: --resample {fine,dirty,ntom} now instead of numbers, fine default
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4648 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 16:55:52 +00:00
thor
4d4fcfdab3 out123: do not shrink input buffer below pcmblock
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4647 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 16:38:22 +00:00
thor
075d91675f libout123/dummy: accept any encoding
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4646 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 16:00:00 +00:00
thor
de748984bf libsyn123: add syn123_resample_fillcount() for convenience
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4645 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-25 07:43:53 +00:00
thor
643896dc9b mpg123: first working use of the syn123 resample
This now forces the proper resampler with --rate and --resample with
non-zero value.

TODO:
- Avoid the resampler when unnecessary. This is some more complex
  setup code, but doable. Loose filter history on re-enabling
  the resampler.
- Finish integration with pitching.


Have a look at that:

for s in 0 1 2
  do src/mpg123 -vv  -r 48000 --resample $s -w sweep$s.wav src/tests/sweep.mp3
  sox sweep$s.wav -n spectrogram
  mv spectrogram.png sweep$s.png
done

Some graphs that drive the point home.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4644 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-24 06:53:28 +00:00
thor
abbc7ccf68 mpg123: output errors not quiet
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4643 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-23 21:40:32 +00:00
thor
638599f163 mpg123: another step to resampling, fixing --pitch on passing
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4642 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-23 21:23:09 +00:00
thor
1472a16961 mpg123, libout123: remove MAXOUTBURST dead code
This only affects one output module that wasn't built since a long time,
I guess.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4641 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-23 20:07:10 +00:00
thor
790140a7b5 mpg123: prepare for the resampler
This adds some bits for supporting the syn123 resampler, but not putting
it to work yet.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4640 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-23 18:57:20 +00:00
thor
92efda54b5 libsyn123: remove a debugging line
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4639 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-23 18:47:48 +00:00
thor
e9846f5ae7 TODO: Tidy up notes?
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4638 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-22 07:26:35 +00:00
thor
202bce0483 mpg123: condense audio cap table
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4637 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-22 07:07:14 +00:00
thor
907bf0ab18 mpg123: finish up the printout filtering (bug 267)
This now filters strings from libmpg123 metadata and the user/web input for useless/nasty
control/non-printable characters when the output is a terminal. It covers all relevant
printouts except the ones I forgot. Metadata, user-provided command-line arguments and
file names in the playlist are covered. I guess really relevant is the data that the
user did not enter explicitly (metadata in streams, playlist from URL).

The proper way would be to fully use locales and a curses library to sanitize terminal
output, but I really would like to avoid that mess, having my personal mess as a compromise
that should mostly work OK. Future may correct me. When we want to do it properly, we should
re-write the whole mpg123 application from scratch, using the mpg123 libraries for audio and
other libraries for the interface.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4636 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-19 19:56:04 +00:00
thor
3d3ad9d9ca mpg123: free(prebuffer) after out123 is done with it
This early free() of the buffer in safe_exit() occured while the output
may still be during execution of out123_play() to use that buffer. Now
it's after output stopped.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4635 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-19 19:30:59 +00:00
thor
e77fb426b9 mpg123: clear progress bar before metadata
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4634 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-16 22:50:04 +00:00
thor
44ea7a1455 mpg123: breaks to space
This catches whitespace characters like line breaks and turns sequences
of those into a single normal space character before filtering for
nasties in terminal output. So 

Some

Strange
Title

turns into Some Strange Title for print, not SomeStrangeTitle.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4633 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-15 07:12:26 +00:00
thor
d6d3828e14 mpg123: debugging line removed
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4632 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-15 06:34:21 +00:00
thor
9ce0428aa7 mpg123: More work on safe metadata printing, preparations.
This introduces a check to only filter the non-printing characters
when actually printing to a terminal. The print_outstr() function
shall be used in future.

The test mp3 file got a line break introduced in the album name.


git-svn-id: svn://scm.orgis.org/mpg123/trunk@4631 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-13 15:13:12 +00:00
thor
bed3d51843 metaprint: add unknown2utf8()
This takes the code out if id3_gap() to be able to make UTF-8 from any encoding
that mpg123 encounters elsewhere (assuming everything is ASCII-based there).



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4630 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-07 05:54:01 +00:00
thor
9169bf3c40 NEWS: rephrase TODO before 1.26.0
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4629 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-05 22:49:16 +00:00
thor
266017300e TODO for the future
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4628 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-05 22:48:02 +00:00
thor
e8178d7ad1 mpg123: --streamdump with unintr_write().
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4627 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-05 22:41:01 +00:00
thor
a8c1de7de7 out123, mpg123: (non-)handling of --STDOUT, unintr_write() fix
This makes --STDOUT for out123 more official and robust using
newly introduced unintr_fwrite(). The other unintr functions got
fixes for actual interrupts that result in negative return vaues.

For mpg123, --STDOUT has been removed. It was an alias to --stdout
anyway, and it it actually not that easy to get right with the
live playback semantics.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4626 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-04-05 22:36:27 +00:00
thor
0a84604b77 mpg123, libmpg123, libout123: QUIET fixup
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4625 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-29 22:22:13 +00:00
thor
c118b45237 libmpg123: try to clarify the difference between mpg123_length() and mpg123_framelength()
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4624 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-18 12:01:26 +00:00
thor
3d9e335b68 libmpg123: a wrong file from the past
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4623 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-17 23:10:42 +00:00
thor
78a175b662 libmpg123: no MPG123_NEED_MORE for non-feeder
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4622 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-16 08:20:45 +00:00
thor
b3a03cd800 man: updated dates
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4621 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-16 08:09:50 +00:00
thor
b030c49633 examples: fix compiler warnings
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4620 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-16 07:19:54 +00:00
thor
99336c6530 examples: mpg123_test got lost in communication
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4619 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-16 07:13:00 +00:00
thor
17b63dafa5 man: Add man-page hint for JACK ports in -a
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4618 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-15 15:00:08 +00:00