1
0
mirror of http://mpg123.de/trunk/.git synced 2025-10-28 02:55:29 +03:00
Commit Graph

2767 Commits

Author SHA1 Message Date
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
thor
6ba13c1092 NEWS: TODO block, only these, please
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4617 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-15 14:31:41 +00:00
thor
ed0d5dfe27 NEWS: reorder, drop some less important TODO notes, want to ship
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4616 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-15 14:29:21 +00:00
thor
19c8b9a841 libmpg123: a 2020
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4615 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-15 14:28:59 +00:00
thor
3a8b2a34ba TODO: done ID3v2 multiparsing
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4614 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-15 14:09:01 +00:00
thor
a7b6f83a9a libout123: zerosample is unsigned char array
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4611 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 14:50:02 +00:00
thor
984d858faf libmpg123: fix mpg123_move_string return value
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4610 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 14:49:29 +00:00
thor
bc28e60fe8 libmpg123: check for ID3v2.4 update tags and replace old ID3v2 data otherwise
This finally enables proper operation on concatenated files appearing as
one big stream with multiple embedded ID3v2 tags. The mode of actually
updating exiting data instead of replacing it has been tested by me before
this commit, but will lay dormant now until someone presents a file that
actually features an ID3v2.4 update tag.

There are parts of the spec that are just theoretical. I even looked at
a competing implementaton in taglib and didn't notice any extended header
parsing besides skipping it. So I guess hardly anyone ever bothered
implementing that part of the spec.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4609 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 14:38:18 +00:00
thor
464d3b592b libmpg123: ID3v2 cleanup 1 (properly append tags with overwriting)
This implements proper behaviour for the assumption that multiple encountered
ID3v2 tags shall be applied as updates, adding only to the stored elements
if existing entries should not be overwritten according to the uniqueness
rules of the standard.

An easy way to test this is to decode a track with --seek-index 0 and
repeatedly seek back to the beginning (and add a line to print out
the number of collected ID3 texts/comments). The old libmpg123 would
steadily append the same entries again and again to the id3 data
structures as the leading ID3v2 tag is parsed repeatedly. This is
strictly speaking no memory leak as the pointers are still properly
managed, but of course it is a leak in practice as data accumulates
needlessly.

Note that this accumulation only happened when the user explicitly
disabled the seek index for regular files, which would prevent repeated
parsing of a leading ID3v2 tag, or in the case of concatenated files
in one big stream, where libmpg123 would remember all ID3v2 data
ever encountered. It is not easy to judge the bugginess of this behaviour.
It could actually be a feature to accumulate all ID3 data. And users
could call mpg123_meta_free() after each extraction to minimize memory
usage. Nevertheless, this ends now in the sense that ID3v2 frames/fields
that are supposed to be unique are also unique in storage.

The next step will be to add parsing of the update flag and clearing
of existing ID3v2 data when a non-update tag is parsed.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@4608 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 13:03:09 +00:00
thor
144cf9dd92 libmpg123: add mpg123_same_string() and mpg123_move_string()
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4607 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 12:41:57 +00:00
thor
a03f363ac4 mpg123: ignore ID3v1 on Frankenstein streams
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4606 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 12:39:25 +00:00
thor
2b57e21438 NEWS: typo
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4605 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 12:38:29 +00:00
thor
1d81ea14bc ports/cmake: some fixes for Windows output modules and a bit of libm
git-svn-id: svn://scm.orgis.org/mpg123/trunk@4604 35dc7657-300d-0410-a2e5-dc2837fedb53
2020-03-14 09:18:59 +00:00