8 months agoopusdec: Use literal format strings
Mark Harris [Fri, 4 May 2018 06:51:35 +0000 (23:51 -0700)]
opusdec: Use literal format strings

Allows for automatic checking of arguments.

8 months agogitlab-ci: Add libpcap-dev for opusrtp
Mark Harris [Mon, 30 Apr 2018 06:16:50 +0000 (23:16 -0700)]
gitlab-ci: Add libpcap-dev for opusrtp

8 months agoopusdec: Fix some compiler warnings
Mark Harris [Mon, 30 Apr 2018 06:08:47 +0000 (23:08 -0700)]
opusdec: Fix some compiler warnings

8 months agoopusrtp: Fix error if pcap is unavailable
Mark Harris [Mon, 30 Apr 2018 05:38:05 +0000 (22:38 -0700)]
opusrtp: Fix error if pcap is unavailable

8 months agoopusrtp: Guess payload type if none specified
Mark Harris [Sat, 28 Apr 2018 20:32:44 +0000 (13:32 -0700)]
opusrtp: Guess payload type if none specified

Adapted from https://github.com/xiph/opus-tools/pull/31, authored
by Muhammad Zaka.

In opusrtp sniff or extract mode, if an output file is specified but
not a payload type, record the first dynamic payload type seen with a
packet that could be a valid Opus packet.

Closes https://github.com/xiph/opus-tools/pull/31

8 months agoopusrtp: Avoid global variables for options
Mark Harris [Sat, 28 Apr 2018 19:28:04 +0000 (12:28 -0700)]
opusrtp: Avoid global variables for options

8 months agoopusrtp: Consolidate sniff and extract code
Mark Harris [Sun, 22 Apr 2018 04:06:23 +0000 (21:06 -0700)]
opusrtp: Consolidate sniff and extract code

Add -o/--output to specify output file for either sniff or extract
and allow - for stdout.  Allow sniff/extract console output with no
output file (do not default to writing a file with a fixed name).
Use -r/--rate instead of -s/--samplerate for consistency with opusdec.
Clearly indicate in --help which options require an argument.

8 months agoopusrtp: Use opus_packet_get_nb_samples()
Mark Harris [Sun, 4 Mar 2018 00:05:08 +0000 (16:05 -0800)]
opusrtp: Use opus_packet_get_nb_samples()

Use opus_packet_get_nb_samples() instead of our own function, and
warn about packets with an invalid TOC as the timestamp is likely
to be wrong.  Also avoid declarations after statements.

8 months agoopusrtp: Fix transmit timing
Mark Harris [Sat, 3 Mar 2018 11:01:38 +0000 (03:01 -0800)]
opusrtp: Fix transmit timing

Because it would sleep for the entire packet duration after sending
each packet, the packets would end up too far apart and cause underruns.

Do not depend on usleep() if its POSIX replacements are available.
usleep() was obsoleted in POSIX.1-2001 and removed in POSIX.1-2008.

8 months agoopusrtp: Fix indentation
Mark Harris [Fri, 2 Mar 2018 07:28:47 +0000 (23:28 -0800)]
opusrtp: Fix indentation

8 months agoopusrtp: Allow an output filename for extraction
Martin Meszaros [Fri, 17 Nov 2017 14:11:35 +0000 (15:11 +0100)]
opusrtp: Allow an output filename for extraction

Closes https://github.com/xiph/opus-tools/pull/18
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
8 months agoopusrtp: Make --extract argument mandatory
Martin Meszaros [Wed, 8 Nov 2017 11:02:14 +0000 (12:02 +0100)]
opusrtp: Make --extract argument mandatory

Make the --extract argument mandatory, as optional arguments don't
work as expected by most people anyway.
Also, now all other parameters are parsed before extraction begins, so
the order of the flags doesn't matter anymore.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
8 months agoopusrtp: Add new command line options
Martin Meszaros [Fri, 27 Oct 2017 16:31:43 +0000 (18:31 +0200)]
opusrtp: Add new command line options

Allow the payload type, number of channels, and sample rate to be

Closes https://github.com/xiph/opus-tools/issues/26
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
8 months agoopusrtp: Add support for RTP extension headers
Martin Meszaros [Fri, 27 Oct 2017 19:52:12 +0000 (21:52 +0200)]
opusrtp: Add support for RTP extension headers

Properly calculate the header size when extension headers are used.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
8 months agoopusrtp: Allow usage of winpcap on Windows
Martin Meszaros [Fri, 27 Oct 2017 16:17:10 +0000 (18:17 +0200)]
opusrtp: Allow usage of winpcap on Windows

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
8 months agogitignore: Ignore *.exe files
Martin Meszaros [Fri, 10 Nov 2017 21:01:57 +0000 (22:01 +0100)]
gitignore: Ignore *.exe files

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
9 months agoopusenc: --set-ctl-int parameter validation
Mark Harris [Sat, 21 Apr 2018 21:52:51 +0000 (14:52 -0700)]
opusenc: --set-ctl-int parameter validation

Ensure that the request is one that takes an int parameter that can be
overridden safely without the need for special handling in opusenc.

9 months agoopusenc: Add --music, --speech, --no-phase-inv
Mark Harris [Mon, 16 Apr 2018 04:48:47 +0000 (21:48 -0700)]
opusenc: Add --music, --speech, --no-phase-inv

--music and --speech override automatic detection and affect low

--no-phase-inv disables use of phase inversion for intensity stereo.

9 months agoconfigure: Check for opusfile before opusurl
Mark Harris [Sat, 17 Mar 2018 18:37:15 +0000 (11:37 -0700)]
configure: Check for opusfile before opusurl

Checking for opusfile first will offer a more helpful message if it is
not installed, since the package that is needed is likely opusfile.

9 months agoconfigure: Require Opus 1.1 to match libopusenc
Mark Harris [Sat, 17 Mar 2018 18:29:45 +0000 (11:29 -0700)]
configure: Require Opus 1.1 to match libopusenc

9 months agoopusenc: Avoid leak on multiple save-range options
Mark Harris [Sat, 10 Mar 2018 21:01:40 +0000 (13:01 -0800)]
opusenc: Avoid leak on multiple save-range options

10 months agoopusenc: Use OPE_GET_NB_STREAMS/COUPLED_STREAMS
Mark Harris [Sat, 3 Mar 2018 10:55:45 +0000 (02:55 -0800)]

This is a more straightforward way of getting the number of streams
and coupled streams.  Requires a new libopusenc.

10 months agoconfigure: Don't enable stack-protector on Windows
Mark Harris [Sun, 4 Mar 2018 02:59:31 +0000 (18:59 -0800)]
configure: Don't enable stack-protector on Windows

It creates a dependency on libssp.dll.

10 months agoSwitch to -fstack-protector-strong from -all
Mark Harris [Sat, 24 Feb 2018 05:53:50 +0000 (21:53 -0800)]
Switch to -fstack-protector-strong from -all

-fstack-protector-all appears to be overkill; -fstack-protector-strong
still adds checks where they make sense.

10 months agoAdd GitLab CI
Mark Harris [Thu, 22 Feb 2018 10:05:52 +0000 (02:05 -0800)]
Add GitLab CI

10 months agoAttempt to make whitespace a bit more consistent
Mark Harris [Sat, 24 Feb 2018 04:57:54 +0000 (20:57 -0800)]
Attempt to make whitespace a bit more consistent

10 months agoopusenc: Fix some MSVC compiler warnings
Mark Harris [Fri, 23 Feb 2018 11:15:50 +0000 (03:15 -0800)]
opusenc: Fix some MSVC compiler warnings

10 months agoUse consistent formatting of units
Mark Harris [Thu, 22 Feb 2018 08:38:02 +0000 (00:38 -0800)]
Use consistent formatting of units

10 months agoopusenc: Fix formatting of time stats
Mark Harris [Thu, 22 Feb 2018 08:04:57 +0000 (00:04 -0800)]
opusenc: Fix formatting of time stats

10 months agoUpdate copyright year
Mark Harris [Thu, 22 Feb 2018 06:28:29 +0000 (22:28 -0800)]
Update copyright year

10 months agoopusenc: Improve error reporting
Mark Harris [Thu, 22 Feb 2018 06:05:59 +0000 (22:05 -0800)]
opusenc: Improve error reporting

Check the return code of every libopusenc function and display an
error when appropriate.

11 months agoopusdec: Update resampler from speexdsp
Mark Harris [Thu, 8 Feb 2018 05:16:27 +0000 (21:16 -0800)]
opusdec: Update resampler from speexdsp

Fix use of reserved identifiers, eliminate compiler warnings.

11 months agoRemove unused Speex header file os_support.h
Mark Harris [Thu, 8 Feb 2018 05:12:06 +0000 (21:12 -0800)]
Remove unused Speex header file os_support.h

11 months agoEliminate dependency on Speex os_support.h
Mark Harris [Thu, 8 Feb 2018 05:10:11 +0000 (21:10 -0800)]
Eliminate dependency on Speex os_support.h

11 months agoopusenc: Add FLAC pictures using libopusenc
Mark Harris [Tue, 6 Feb 2018 08:02:58 +0000 (00:02 -0800)]
opusenc: Add FLAC pictures using libopusenc

This eliminates the need to do base64 encoding in opusenc, and
ensures that pictures are valid.  Requires a new libopusenc with

11 months agoopusenc: Set header gain when requested
Mark Harris [Mon, 5 Feb 2018 00:03:52 +0000 (16:03 -0800)]
opusenc: Set header gain when requested

Used by FLAC input.  Requires latest libopusenc from git.

11 months agoDon't use reserved identifiers as macro names
Mark Harris [Sun, 4 Feb 2018 04:04:01 +0000 (20:04 -0800)]
Don't use reserved identifiers as macro names

11 months agoopusenc: Fix stats and percent progress
Mark Harris [Sun, 4 Feb 2018 02:05:26 +0000 (18:05 -0800)]
opusenc: Fix stats and percent progress

Values were wrong with multi-frame packets or resampling.
Also don't divide by zero, eliminate unused fields.

11 months agoUse correct format specifier for 64-bit types
Mark Harris [Fri, 2 Feb 2018 06:23:21 +0000 (22:23 -0800)]
Use correct format specifier for 64-bit types

Correct fprintf format string warnings with libopus 1.3-beta on 64-bit
Linux (long long vs. long).  Also enable format string warnings for
oi_info(), oi_warn(), and oi_error() and correct those warnings as well.

11 months agoC preprocessor formatting cleanup
Mark Harris [Fri, 2 Feb 2018 05:28:58 +0000 (21:28 -0800)]
C preprocessor formatting cleanup

12 months agoVS2010: Remove old project files test3-appveyor
Mark Harris [Sat, 6 Jan 2018 04:46:40 +0000 (20:46 -0800)]
VS2010: Remove old project files

The VS2010 project files have not been updated and no longer work.
Also, opus, ogg, opusfile, and libopusenc support only VS2015.

12 months agoVS2015: remove source files from libs that don't need them
Ricardo Constantino [Fri, 5 Jan 2018 16:15:29 +0000 (16:15 +0000)]
VS2015: remove source files from libs that don't need them

Closes https://github.com/xiph/opus-tools/pull/24
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
12 months agoVS2015: add flac support
Ricardo Constantino [Thu, 4 Jan 2018 00:00:41 +0000 (00:00 +0000)]
VS2015: add flac support

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
12 months agoVS2015: prepare for new opusfile and libopusenc dependencies
Ricardo Constantino [Tue, 2 Jan 2018 00:53:06 +0000 (00:53 +0000)]
VS2015: prepare for new opusfile and libopusenc dependencies

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
12 months agoappveyor: Fix libopusenc artifact file name
Mark Harris [Fri, 5 Jan 2018 08:11:33 +0000 (00:11 -0800)]
appveyor: Fix libopusenc artifact file name

12 months agoappveyor: Install opusfile and libopusenc artifacts.
Ralph Giles [Sat, 24 Jun 2017 01:17:00 +0000 (18:17 -0700)]
appveyor: Install opusfile and libopusenc artifacts.

Make these dependent libraries available for the Visual Studio
integration build.

12 months agoVS*: Remove deleted files from VS projects
Mark Harris [Wed, 3 Jan 2018 09:30:55 +0000 (01:30 -0800)]
VS*: Remove deleted files from VS projects

12 months agoUpdate Makefile.unix
Mark Harris [Wed, 3 Jan 2018 09:21:38 +0000 (01:21 -0800)]
Update Makefile.unix

12 months agoopusdec: Update help and man page
Mark Harris [Wed, 3 Jan 2018 08:51:25 +0000 (00:51 -0800)]
opusdec: Update help and man page

12 months agoopusdec: Use HAVE_*SOUNDCARD_H consistently
Mark Harris [Wed, 3 Jan 2018 08:33:20 +0000 (00:33 -0800)]
opusdec: Use HAVE_*SOUNDCARD_H consistently

Check whether the macro is defined rather than sometimes checking
its value.

12 months agoopusinfo: Fix compiler warning
Mark Harris [Wed, 3 Jan 2018 08:27:34 +0000 (00:27 -0800)]
opusinfo: Fix compiler warning

12 months agosave_range: Correctly handle multistream padding
Mark Harris [Tue, 2 Jan 2018 07:12:22 +0000 (23:12 -0800)]
save_range: Correctly handle multistream padding

opus_packet_parse_impl() is updated based on the current Opus code.
Also fixes compiler warnings, including use of uninitialized data
if the packet is invalid.

12 months agoUpdate http URLs to https where appropriate
Mark Harris [Tue, 2 Jan 2018 07:24:17 +0000 (23:24 -0800)]
Update http URLs to https where appropriate

12 months agoconfigure: Fix non-pkg-config opus include path
Mark Harris [Tue, 2 Jan 2018 06:59:19 +0000 (22:59 -0800)]
configure: Fix non-pkg-config opus include path

If pkg-config is not used, look for opus.h in <prefix>/include/opus
or (using --with-opus=<opuspath>) <opuspath>/include/opus, not
<prefix>/include or <opuspath>/include.  As before the opus include
directory can still be overridden with --with-opus-includes=<path>,
but this should not be needed if the development package is
installed under <prefix> or the --with-opus directory.

12 months agoopusenc: Don't save --picture in ENCODER_OPTIONS
Mark Harris [Sun, 31 Dec 2017 01:45:07 +0000 (17:45 -0800)]
opusenc: Don't save --picture in ENCODER_OPTIONS

Saving --picture leaks local file paths. Also don't save options that
relate only to console output or input file handling like --quiet and

12 months agoopusinfo: Relax JPEG check to allow EXIF metadata
Mark Harris [Fri, 29 Dec 2017 02:37:57 +0000 (18:37 -0800)]
opusinfo: Relax JPEG check to allow EXIF metadata

12 months agoopusenc: Convert to use libopusenc
Jean-Marc Valin [Thu, 11 May 2017 02:30:32 +0000 (22:30 -0400)]
opusenc: Convert to use libopusenc

This adds a dependency, but gets rid of a lot of code. The main benefit
is that libopusenc supports delayed decision.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
12 months agoopusdec: Convert to use libopusfile
Timothy B. Terriberry [Sat, 18 Nov 2017 09:58:30 +0000 (01:58 -0800)]
opusdec: Convert to use libopusfile

This adds a dependency, but also a number of features, such as the
 ability read from http[s] sources or downmix output to stereo.
It also allows opusdec to automatically pick a consistent output
 sample rate and channel count for seekable chained files, and
 gives nicer output for METADATA_BLOCK_PICTURE tags (we parse the
 tags and give a summary, instead of dumping a huge BASE64 string).

Unfortunately, we still have to do our own dithering, as this needs
 to be done after resampling, which happens outside of libopusfile,
 but at least we can re-use libopus's soft clipping implementation.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
12 months agotravis: Build libopusenc from source for the linux tests
Ralph Giles [Sat, 24 Jun 2017 00:38:41 +0000 (17:38 -0700)]
travis: Build libopusenc from source for the linux tests

There's no Ubuntu package for libopusenc, so we need
to provide our own binary.

12 months agotravis: Add opusfile and libopusenc dependency
Ralph Giles [Mon, 19 Jun 2017 21:03:12 +0000 (14:03 -0700)]
travis: Add opusfile and libopusenc dependency

libopusenc isn't packaged for Ubuntu trusty, so we need to build it.

12 months agoUse libtool to allow uninstalled dependencies
Jean-Marc Valin [Wed, 13 Dec 2017 20:03:33 +0000 (12:03 -0800)]
Use libtool to allow uninstalled dependencies

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
12 months agoopusenc: Avoid uninitialized data on invalid FLAC
Mark Harris [Sun, 31 Dec 2017 02:50:26 +0000 (18:50 -0800)]
opusenc: Avoid uninitialized data on invalid FLAC

An invalid FLAC input file with no STREAMINFO would cause the
uninitialized value of flac->channels to be used, and most likely
an assertion failure.

12 months agoopusenc: Use fseeko64/ftello64 on MinGW/MinGW-W64
Mark Harris [Fri, 29 Dec 2017 02:42:39 +0000 (18:42 -0800)]
opusenc: Use fseeko64/ftello64 on MinGW/MinGW-W64

MinGW-W64 _ftelli64() sometimes reports an incorrect position.
Found and tested by Andrew D'Addesio.

19 months agoappveyor: get opus artifacts from appveyor
Ricardo Constantino [Tue, 21 Feb 2017 22:08:30 +0000 (22:08 +0000)]
appveyor: get opus artifacts from appveyor

Saves a bit of time.

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agoappveyor: run a basic test on the compiled binaries
Ricardo Constantino [Tue, 21 Feb 2017 22:10:03 +0000 (22:10 +0000)]
appveyor: run a basic test on the compiled binaries

Pack resulting artifact from opusenc test for debugging.

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agoappveyor: pack manuals from jenkins
Ricardo Constantino [Tue, 21 Feb 2017 22:09:49 +0000 (22:09 +0000)]
appveyor: pack manuals from jenkins

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agoappveyor: save artifact to constant name
Ricardo Constantino [Fri, 10 Feb 2017 02:11:01 +0000 (02:11 +0000)]
appveyor: save artifact to constant name

So it can be used with a permalink to the latest build.

ex: https://ci.appveyor.com/api/projects/rillian/opus-tools/artifacts/opus-tools.zip?job=Configuration%3A%20Release%3B%20Platform%3A%20x64
This is a permalink to the latest successful build of Release x64.

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agoVS2015: remove unneeded and duplicated options
Ricardo Constantino [Tue, 21 Feb 2017 00:22:20 +0000 (00:22 +0000)]
VS2015: remove unneeded and duplicated options

Add additional properties file for opus-tools shared by the three
Don't compile unneeded files for each project.

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agoVS2015: Add opus common.props
Ricardo Constantino [Fri, 17 Feb 2017 15:15:34 +0000 (15:15 +0000)]
VS2015: Add opus common.props

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agoMakefile.am: add VS2015 files
Ricardo Constantino [Tue, 21 Feb 2017 22:25:11 +0000 (22:25 +0000)]
Makefile.am: add VS2015 files

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agowin32/gitignore: Ignore generated version.h
Ricardo Constantino [Fri, 17 Feb 2017 15:06:32 +0000 (15:06 +0000)]
win32/gitignore: Ignore generated version.h

Signed-off-by: Ralph Giles <giles@thaumas.net>
22 months agoopusenc: Avoid seeking on Windows pipes
Mark Harris [Wed, 22 Feb 2017 02:02:50 +0000 (18:02 -0800)]
opusenc: Avoid seeking on Windows pipes

On Windows, fseek() on pipes may return zero even though it doesn't seek,
so check the file type before trying to seek.  Also, Windows prefers
_fileno() over fileno().

23 months agoupdate_version: Drop --always from git describe v0.1.10
Mark Harris [Sun, 22 Jan 2017 21:02:45 +0000 (13:02 -0800)]
update_version: Drop --always from git describe

The package_version file will be used if there are no tags, which
is better than just the hash that is returned by --always.

23 months agoappveyor: remove version prefix from artifacts
Ricardo Constantino [Sun, 22 Jan 2017 20:44:35 +0000 (20:44 +0000)]
appveyor: remove version prefix from artifacts

Also appveyor.yml configuration file is moved to .appveyor.yml.

Closes https://github.com/xiph/opus-tools/pull/14
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
23 months agoAdd more coverage in travis
Stephen [Sat, 21 Jan 2017 16:28:14 +0000 (08:28 -0800)]
Add more coverage in travis

Closes https://github.com/xiph/opus-tools/pull/12
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
23 months agowin32: use same genversion script as opus
Ricardo Constantino [Sun, 22 Jan 2017 13:06:52 +0000 (13:06 +0000)]
win32: use same genversion script as opus

Like with opus, this generates an unknown version for git archives
(like the ones generated by GitHub). If you need a proper version
either use releases, a proper git repo or craft your own

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
23 months agoopusenc: Avoid resampler fractional sample offset
Jean-Marc Valin [Sun, 22 Jan 2017 05:31:12 +0000 (21:31 -0800)]
opusenc: Avoid resampler fractional sample offset

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
23 months agoRemove obsolete ChangeLog
Mark Harris [Sun, 22 Jan 2017 04:44:26 +0000 (20:44 -0800)]
Remove obsolete ChangeLog

23 months agoUpdate copyright year
Mark Harris [Sun, 22 Jan 2017 04:40:15 +0000 (20:40 -0800)]
Update copyright year

2 years agoopusenc: Clean up help
Mark Harris [Thu, 1 Oct 2015 08:58:42 +0000 (01:58 -0700)]
opusenc: Clean up help

Clearly indicate which options require a parameter and its usual
format.  Use imperative verb form consistently.  Minor rearrangement
to improve logical ordering.  Move diagnostic options to the end.
Move verbose --picture details to --help-picture so that basic usage
information has a chance of fitting on one screen.  Change use of
obsolete term "MIME type" to "media type".  Update man page to match.

2 years agoopusenc: Fix typos
Mark Harris [Thu, 1 Oct 2015 08:57:20 +0000 (01:57 -0700)]
opusenc: Fix typos

2 years agoopusenc: Don't read excess data after samples
Mark Harris [Thu, 1 Oct 2015 08:55:33 +0000 (01:55 -0700)]
opusenc: Don't read excess data after samples

When reading WAV/AIFF data with a known length, don't try to read
(and then discard) data beyond that length, to avoid blocking or
adding unnecessary latency when the data is not from a file.

2 years agoopusenc: Limit end trimming to one frame
Mark Harris [Thu, 1 Oct 2015 08:49:28 +0000 (01:49 -0700)]
opusenc: Limit end trimming to one frame

Avoid writing a final packet larger than 20ms that is larger than
necessary, with 20ms or more that is beyond the end of the stream.

2 years agoopusenc: Change fatal WAV/AIFF warnings to errors
Mark Harris [Thu, 1 Oct 2015 08:48:19 +0000 (01:48 -0700)]
opusenc: Change fatal WAV/AIFF warnings to errors

2 years agoopusenc: Don't warn about mono center channel WAV
Mark Harris [Thu, 1 Oct 2015 08:51:00 +0000 (01:51 -0700)]
opusenc: Don't warn about mono center channel WAV

Even if it has only one channel, an input WAV file can contain a
channel mask. A warning is issued if it is present but not a
supported value. Don't warn about the previously accepted mask
of 1 (FL), or 4 (FC).  Arguably a channel mask of 1 (FL) should
trigger the warning, just as 2 (FR) does, but some tools (including
old opusdec when decoding to floating point WAV) actually write an
incorrect channel mask of 1 for mono WAV files.

2 years agoopusdec: Fix channel mask in mono float WAV output
Mark Harris [Thu, 1 Oct 2015 08:50:35 +0000 (01:50 -0700)]
opusdec: Fix channel mask in mono float WAV output

Mono channel mask changed from 1 (front left) to 4 (front center)
in WAV output.

2 years agoopusrtp::sniff() - Call pcap_close for any error condition.
Ralph Giles [Mon, 16 Jan 2017 19:00:14 +0000 (11:00 -0800)]
opusrtp::sniff() - Call pcap_close for any error condition.

This avoids leaking the handle on error.

2 years agoopusrtp::extract() - call pcap_close for any error condition
Giacomo Vacca [Sun, 15 Jan 2017 19:37:31 +0000 (20:37 +0100)]
opusrtp::extract() - call pcap_close for any error condition

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoopusrtp::extract() - use only if HAVE_PCAP
Giacomo Vacca [Sun, 15 Jan 2017 19:32:07 +0000 (20:32 +0100)]
opusrtp::extract() - use only if HAVE_PCAP

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoopusrtp: add extract (from file) option
Giacomo Vacca [Thu, 12 Jan 2017 10:42:46 +0000 (11:42 +0100)]
opusrtp: add extract (from file) option

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoopusdec: fix crash with 64-bit VS builds
Ricardo Constantino [Sat, 14 Jan 2017 18:39:50 +0000 (18:39 +0000)]
opusdec: fix crash with 64-bit VS builds

Fix suggested by mark4o.
Tested with 32 and 64-bit VS2015 and MinGW GCC 6.3.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2 years agoopusenc: Sanitize sample rate, fix rate from AIFF
Mark Harris [Thu, 1 Oct 2015 08:53:04 +0000 (01:53 -0700)]
opusenc: Sanitize sample rate, fix rate from AIFF

Fix errors (not affecting common values) in reading the sample rate
from AIFF: the low 32 bits of the mantissa were incorrectly interpreted
as signed, the first byte rather than first bit was being used as
a sign, and non-integer rates were not properly rounded.

Although the sample rate is validated prior to setting up the
resampler, sample rates outside the range of an "int" could cause
undefined behavior prior to that when cast from double to int for
AIFF. Such rates could also be incorrect for WAV on 32-bit builds.
Ensure that the rate is within the range of an int prior to casting.

2 years agoFix potential uninitialized access for set-ctl-int
Michael Graczyk [Tue, 26 Apr 2016 03:43:34 +0000 (20:43 -0700)]
Fix potential uninitialized access for set-ctl-int

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2 years agoopusenc: Use correct types for WAV/AIFF fields
Mark Harris [Thu, 1 Oct 2015 08:44:34 +0000 (01:44 -0700)]
opusenc: Use correct types for WAV/AIFF fields

Don't treat unsigned fields as negative.
Fixes crash due to negative totalsamples.

2 years agoopusrtp: Fix clang -Wcast-align warning
Mark Harris [Fri, 18 Dec 2015 23:18:09 +0000 (15:18 -0800)]
opusrtp: Fix clang -Wcast-align warning

2 years agoopusenc: Write valid Opus file when 80+ channels
Mark Harris [Thu, 1 Oct 2015 08:47:24 +0000 (01:47 -0700)]
opusenc: Write valid Opus file when 80+ channels

2 years agoopusenc: Fix display of percent progress
Mark Harris [Thu, 1 Oct 2015 08:35:03 +0000 (01:35 -0700)]
opusenc: Fix display of percent progress

Fixes https://trac.xiph.org/ticket/2132, initial patch by rillke

2 years agoUse the appveyor badge for the xiph github repo.
Ralph Giles [Wed, 21 Sep 2016 19:35:18 +0000 (12:35 -0700)]
Use the appveyor badge for the xiph github repo.

2 years agoAdd badges
Chocobo1 [Sun, 31 Jul 2016 02:29:00 +0000 (10:29 +0800)]
Add badges

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoModernize README
Chocobo1 [Sun, 31 Jul 2016 02:27:45 +0000 (10:27 +0800)]
Modernize README

Adopt markdown format

Signed-off-by: Ralph Giles <giles@thaumas.net>