Re: [flac-dev] Commonly getting FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA on valid audio

2013-02-10 Thread Johnny Rosenberg
2013/2/10 Erik de Castro Lopo mle...@mega-nerd.com:
 Johnny Rosenberg wrote:

 Anyway, if I'm allowed to ask a libsndfile question here,

 Sorry, but no, this list is for FLAC related discussion.

And of course you won't waste your time replying outside this mailing list?
Is there a libsndfile mailing list?
Hm… yet another stupid question, of course. If there is, you wouldn't
want me to know about it, right? :P


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ


 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/
 ___
 flac-dev mailing list
 flac-dev@xiph.org
 http://lists.xiph.org/mailman/listinfo/flac-dev
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] Newbie question about those callbacks

2013-02-10 Thread Johnny Rosenberg
2013/2/10 Erik de Castro Lopo mle...@mega-nerd.com:
 Johnny Rosenberg wrote:

 For instance the write_callback thing:
 client_data – can it be a pointer to just about anything?

 I assume you mean:

 https://www.xiph.org/flac/api/group__flac__stream__decoder.html#ga13

 which defines the type:

 typedef FLAC__StreamDecoderWriteStatus
  (* FLAC__StreamDecoderWriteCallback)
  (const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame
  , const FLAC__int32 *const buffer[], void *client_data)

 Yes, client_data can point at anything. You the callee are responsible
 to cast your pointer_to_anything to and from 'void*'

Thanks. That explains the following line in the write_callback
function one of the the two examples I found:
FILE *f=(FILE*)client_data;


 For instance a pointer to a two-dimensional array?

 Yes. They can even be NULL.

Yes, I saw that in the other example… :)


 Whatever pointer you pass as the client_data parameter in the finction
 FLAC__stream_decoder_init_stream () will be passed back to you in the
 callbacks client_data.

 Are those FLAC-WAV and WAV-FLAC examples the only examples available?

 There are examples in the examples/ directory of the FLAC source code
 tarball. They are in Git here:

 
 https://git.xiph.org/?p=flac.git;a=tree;f=examples/c;h=dbcb345dcd699ca3f1a1b1d334f5a48d45385558;hb=HEAD

Ok, that's the two examples that I already know about. I will not
waste more time looking for more examples then. Thanks.


 What would be the best approach to read a FLAC file to an array of
 some kind? Passing a pointer to the array as ”client_data”? I'd like
 to use a two-dimensional array, but it's a little tricky (for a
 newbie) to pass to functions as a pointer.

 I agree, coding to the FLAC API is not something that is easy or obvious
 for a newbie C programmer.

No, I realised that at an early stage. The future will show if I will
give up or not… I am sure I will finish my code, but I'm not sure
whether I will use libflac or something else.


Thanks for helping.


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ


 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/
 ___
 flac-dev mailing list
 flac-dev@xiph.org
 http://lists.xiph.org/mailman/listinfo/flac-dev
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] Commonly getting FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA on valid audio

2013-02-10 Thread Erik de Castro Lopo
Johnny Rosenberg wrote:

 And of course you won't waste your time replying outside this mailing list?
 Is there a libsndfile mailing list?
 Hm… yet another stupid question, of course. If there is, you wouldn't
 want me to know about it, right? :P

http://lmgtfy.com/?q=libsndfile+mailing+listl=1

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] Commonly getting FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA on valid audio

2013-02-10 Thread Johnny Rosenberg
2013/2/10 Erik de Castro Lopo mle...@mega-nerd.com:
 Johnny Rosenberg wrote:

 And of course you won't waste your time replying outside this mailing list?
 Is there a libsndfile mailing list?
 Hm… yet another stupid question, of course. If there is, you wouldn't
 want me to know about it, right? :P

 http://lmgtfy.com/?q=libsndfile+mailing+listl=1

Oh… thanks for making me feel even more stupid…!  :)

I'll try to be less annoying on that list, if I decide to subscribe…



Johnny Rosenberg (no, I'm not the excellent musician from the
Netherlands, I'm just another musician, not so excellent, from another
country, sorry)


 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/
 ___
 flac-dev mailing list
 flac-dev@xiph.org
 http://lists.xiph.org/mailman/listinfo/flac-dev
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev