Re: [flac-dev] using libflac++ on a live internet stream

2017-12-13 Thread Richard Ash
On Wed, 13 Dec 2017 09:12:43 -0700
Chris Barrett  wrote:

> Thanks Brian.  I converted everything to libFLAC and got the same
> results.
> 
> Here is some debug output
> encoder:
> [34.270050] FLAC encoder set succeeded
> [34.271183] write_callback, frame: 0, samples: 0
> [34.271282] write_callback, frame: 0, samples: 0
> [34.271313] write_callback, frame: 0, samples: 0
> [34.271351] FLAC encoder initialization succeeded
> [34.356251] write_callback, frame: 0, samples: 4096
> [34.441582] write_callback, frame: 1, samples: 4096
> [34.526905] write_callback, frame: 2, samples: 4096
> [34.612213] write_callback, frame: 3, samples: 4096
> [34.697556] write_callback, frame: 4, samples: 4096
> [34.697594] SendChanDataMsg: 146
> [34.782898] write_callback, frame: 5, samples: 4096
> [34.782936] SendChanDataMsg: 12
> [34.868168] write_callback, frame: 6, samples: 4096
> [34.868210] SendChanDataMsg: 12
> 
> The audio is silence, so I believe there is a high compression ratio
> ((4096 x 5) + metadata) -> 146 bytes

I think this is your problem - the encoder is being so effective on
digital silence input, that it isn't filling it's output buffer and so
isn't pushing the packet out. If you send real audio (or even LSB
dither noise) then it will fill the buffer and get going.
I seem to remember a thread on this list complaining about this
behaviour at some point in the past, to which the eventual work-around
was mixing in some dither noise to digital silence stop the frames
getting tiny.

Richard
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] Supporting 32 bit data

2015-09-26 Thread Richard Ash
On Sat, 26 Sep 2015 17:22:40 +1000
Erik de Castro Lopo  wrote:
> * Would adding this break brackwards compatibility too badly?
> Obviously decoding of 32 bit encoded data would not work with older
> versions of flac.
> * This is nuts. 24 bits has a dynamic range of ~140dB which is roughly
>   the difference between a quiet whisper in a quiet room, to the sound
>   of a jet engine at 10 meters. Surely that is enough?

On the narrow question of legitimate requirements for very high
resolution data, Audacity uses 32-bit float so that it's essentially
impossible to either clip or loose into noise any intermediate signal,
no matter how strong or weak.

As every intermediate goes to disk (for undo, save and so on), we use
uncompressed .AU 32-bit float format files at the moment. It would be
nice to be able to reduce the size of projects (for archive and
sharing) by lossless compressing them, but at the moment we don't have
many sensible options.

Now this probably doesn't need full floating point support, something
that normalised short blocks and stored the normalisation
coefficients to restore them at decode would be adequate.

Richard
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] [PATCH] for flac/decode.c

2014-12-14 Thread Richard Ash
On Sun, 14 Dec 2014 01:14:16 -0800
Erik de Castro Lopo mle...@mega-nerd.com wrote:
  --
  Also, I have a question.
  
  Currently flac complains about 24-bit .wav files if they have
  old WAVEFORMATEX header and not 'proper' WAVEFORMATEXTENSIBLE
  header. However it writes such files itself.
  
  Is it better to fix this so it decodes 24-bit .flac files to .wav
  files with WAVEFORMATEXTENSIBLE header? Or is it better to leave
  things as is (for better compatibility with old programs)?
 
 That's a good question. I have no idea how to answer that.
 
 Maye what's needed is (another) command line flag.
As someone who get this warning quite a lot when encoding (because the
.wav files come from a closed hardware recorder which isn't going to
get a firmware update), I don't mind too much which header gets
written (because the wav file will be read with libsndfile), but I would
mind if it meant that --verify when encoding didn't work for these
files (I have no idea at what point the verification is done, but
changing this does mean that the decoded file header will be different
to the original input file, which might be the reason it's the way it
is).

Richard
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] [PATCH] for flac/decode.c

2014-12-14 Thread Richard Ash
On Sun, 14 Dec 2014 21:02:12 +0300
lvqcl lvqcl.m...@gmail.com wrote:

 Richard Ash wrote:
 
  As someone who get this warning quite a lot when encoding (because
  the .wav files come from a closed hardware recorder which isn't
  going to get a firmware update), I don't mind too much which header
  gets written (because the wav file will be read with libsndfile),
  but I would mind if it meant that --verify when encoding didn't
  work for these files (I have no idea at what point the verification
  is done, but changing this does mean that the decoded file header
  will be different to the original input file, which might be the
  reason it's the way it is).
 
 Currently the header of a decoded WAV file can be different to the
 original WAV file because FLAC doesn't preserve 'fmt ' chunk.
 
 For example: create a 24-bit stereo .wav file with
 WAVEFORMATEXTENSIBLE header with channel mask == 3. Encode it
 to .flac then decode back to .wav. FLAC creates a 24-bit stereo .wav
 file with WAVEFORMATEX header.

That makes sense, thanks!

Richard
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] Fwd: flac 1.3.0pre1 prelease

2013-03-04 Thread Richard Ash
On Tue, 5 Mar 2013 07:21:49 +1100
Erik de Castro Lopo mle...@mega-nerd.com wrote:
 Ben Allison wrote:
 
  Here's another go at it.  I only have VS2008 and VS2010 to test
  with right now.  VS6.0, VS2003 and VS2005 are untested.
 
 Thanks for your work on this Ben.

Thanks also from the Audacity developers - this being done upstream
will make updating Audacity builds (done all with VS2008 express) to
use the new release a lot easier.

Richard
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] Bug or strange behaviour or --output-prefix

2013-01-02 Thread Richard Ash
On Tue, 1 Jan 2013 18:59:20 -0800
Brian Willoughby bri...@sounds.wa.com wrote:

 Seems like what you really want is an --input-prefix parameter.
 You might also like a --create-output-directories option.
[...] 
 This is basically the long way of saying that the behavior you see
 is by design - it's intended - and you'll find that all Unix
 utilities work the same way. There is nothing to fix here, although
 some new features might get you what you want.

At some point pretty close to here you decide what you really need is a
script which implements the particular behaviour you want, calling flac
for each file it finds, and doing any other housekeeping like directory
creation. Such a script will never be generic however, because it will
depend on the workflow and environment you want to use it in.

Richard
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] The FLAC website

2012-09-06 Thread Richard Ash
On Tue, 2012-08-28 at 14:17 +0200, Martijn van Beurden wrote:
 On 28-08-12 10:46, Erik de Castro Lopo wrote:
 So I got busy but stumbled upon several things. I'm not sure why there 
 are two boxes displaying the same news on the homepage right now, so I 
 made two screenshots of possible designs, one which keeps both boxes and 
 one that moves everything to the sidebar. I've enlarged the sidebar a 
 bit in both.
 
 http://www.icer.nl/images/ktf/flac-website-both.png
 http://www.icer.nl/images/ktf/flac-website-sidebar.png

For what it's worth, I prefer the -both version (first link). Either
way, good to get the site active again.

Richard.

___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] Meet the new maintainer

2012-02-05 Thread Richard Ash
On Wed, 2012-02-01 at 11:50 -0800, Ralph Giles wrote:
  It's been a while since I've worked with Visual Studio, so some dumb
  questions ahead. To start: should I use
  http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express,
  or something else?
 
 That's a fine place to start if you have windows but don't already
 have a copy of the microsoft compiler.

It's probably worth pointing out that Audacity has a working windows
build from the last released Flac sources in it's SVN repo:
http://code.google.com/p/audacity/source/browse/audacity-src/trunk#trunk
%2Flib-src%2Flibflac
and the project file here
http://code.google.com/p/audacity/source/browse/audacity-src/trunk#trunk
%2Fwin%2FProjects%2Flibflac%253Fstate%253Dclosed

These are VS express 2007 I think, but should upgrade to 2010 fine.

Richard

___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [Flac-dev] Variable Bit Rate

2011-05-23 Thread Richard Ash
On Mon, 2011-05-23 at 17:25 -0400, Paul Davis wrote:
 2011/5/23 Scott C. Brown 02 scott.c.brown...@alum.dartmouth.org:
  --- Dennis Brunnenmeyer denn...@chronometrics.com wrote:
   I've been told that FLAC files, when played back into a high-quality sound 
  system,
  fail to properly reproduce certain kinds of sounds, like ringing bells or 
  the
  'clang' of a triangle.
  --- end of quote ---
  maybe he's been reading threads like this:
 
  http://www.audiocircle.com/index.php?topic=92852.20
 
 i guess we need to teach people about the cmp(1) and diff(1) commands.

I did once have a PII machine where the pitch of the built-in sound
device audibly varied with system activity (either CPU of HDD, I didn't
do a lot of testing), but I tended to think that was down to the
lousyness of the sound, not the formats I was playing.

I suspect in fact that the difference in volume in that forum post
explains the change in perceived sound quality completely, human hearing
being very sensitive to that sort of thing. As to why the volume doesn't
match, I suspect that one of the playback chains is integer all the way
and the other is float, with the conversion being not quite right ...

Richard

___
Flac-dev mailing list
Flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [Flac-dev] Indexed FLAC file?

2011-01-09 Thread Richard Ash
On Fri, 2011-01-07 at 18:11 -0500, Brian Waters wrote:
 For a long time I've wanted to make a web-based music database that
 does the tables the right way, with foreign keys and lookup tables for
 artists and albums, instead of the naieve giant excel spreadsheet
 approach that everything else takes these days.

Amarok is fairly well down this route, with an (embedded) MySQL database
for your music collection. I fell out with it for other reasons (it
wouldn't build and was a resource hog), but that seems to be the way
they are going.

Richard

___
Flac-dev mailing list
Flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [Flac-dev] Compiling static libFLAC.a still requires libogg.dylib

2010-08-17 Thread Richard Ash
On Tue, 2010-08-17 at 15:09 +1200, Glenn McCord wrote:
 When I do that, the error looks like
 
 libtool: link: gcc -I/Users/glennm/libOGG-i386/include -O3
 -funroll-loops -finline-functions -Wall -W -Winline -arch i386 -arch
 i386 -o flac analyze.o decode.o encode.o foreign_metadata.o main.o
 local_string_utils.o utils.o vorbiscomment.o
 ../../src/share/grabbag/.libs/libgrabbag.a
 ../../src/share/getopt/libgetopt.a
 ../../src/share/replaygain_analysis/.libs/libreplaygain_analysis.a
 ../../src/share/replaygain_synthesis/.libs/libreplaygain_synthesis.a
 ../../src/share/utf8/.libs/libutf8.a ../../src/libFLAC/.libs/libFLAC.a
 -L/Users/glennm/libOGG-i386/lib
 /Users/glennm/libOGG-i386/lib/libogg.dylib -liconv -lm
 i686-apple-darwin10-gcc-4.2.1:
 /Users/glennm/libOGG-i386/lib/libogg.dylib: No such file or directory
 
 Could this be something to do with the way libtool has been set up?

Have you re-run configure since removing the dynamic libraries? If not,
then the old libtool setup will certainly still be being applied.

It's worth pointing out that this is the link command compiling the
flac command-line tool, and by this point the static libFLAC.a has has
already been compiled. So your options have had an effect, just not
quite the full one you need.

I suspect that the presence of library file names (rather than just -l
options) in the libtool gcc command line is evidence of libtool not
being used quite the way it's authors intended, but I'm no expert in
libtool.

Richard Ash

___
Flac-dev mailing list
Flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [Flac-dev] Flac player for Android

2008-12-26 Thread Richard Ash
On Tue, 2008-12-23 at 00:55 +0100, Tor-Einar Jarnbjo wrote:
 the Android media API (android.media) does not offer the required 
 capabilities to play software generated PCM samples. The first Android 
 SDK releases contained non-functional classes from the standard 
 JavaSound API (javax.sound), but these were removed in later releases. I 
 opened a bug regarding the JavaSound API a year ago, but it was closed 
 by Google with the comment that they don't intend to implement it:
 
 http://code.google.com/p/android/issues/detail?id=60

That's interesting, because Ringdroid plays back WAV files on the
device:
http://code.google.com/p/ringdroid/

(I'm nothing to do with ringdroid, but one of it's developers is also an
Audacity developer)


Richard

___
Flac-dev mailing list
Flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [Flac-dev] FLAC support for unsupported win32 programs

2008-11-16 Thread Richard Ash
On Fri, 2008-11-14 at 17:34 -0800, Aaron Caustik Robinson wrote:
 Not sure if this tool already exists in some form, or if it's been
 talked about before.. but I got to thinking of a way to support FLAC
 in applications that haven't added support in their code:
 
 In windows, programs can be launched using the Microsoft Detours API
 (or similar). This API can be used to do binary instrumentation on the
 programs.
 
 This instrumentation can be used to intercept file i/o calls. This
 means that we can simulate the existance of a .wav file (for example),
 even when that file does not really exist.
 
 This capability can be harnessed by creating a wrapper program that
 opens a .flac file, and pretends that it is actually a file with
 a .wav extension. To the application, it sees a wav file. Behind the
 scenes, the wrapper utility would convert all file read/writes to FLAC
 files.
 
 With some creative instrumentation, this technique could give users
 the capability to open FLAC files with their default .wav file
 handler. Also, the technique could even support drag+drop operations
 (with an explorer plugin and/or explorer instrumentation).
 
 Anyway, I think this is very feasable, but thought I would run it
 through you FLAC developers before digging into it deeper. It would be
 really nice to have FLAC support in a great number of random DJ tools
 I've been using that do not support it already (not to mention various
 other multimedia applications).
 
 This could also really help make FLAC a more popular format, which is
 good for us all :)!
 
 What'dya think?

I've not seen or heard of anything for FLAC, but I believe this is how
Avisynth and Virtual Dub's aviproxy work for AVI files on windows.
http://avisynth.org/mediawiki/Main_Page
http://virtualdub.org/docs_frameserver.html

In those cases, it seems to be a very useful idea which is a bit less
than 100% reliable, but invaluable for those programs / situations where
it works. It might be easier for WAV than AVI because we don't have as
many windows APIs to worry about.

Richard

___
Flac-dev mailing list
Flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev