~ubuntu-branches/ubuntu/wily/alsaplayer/wily

« back to all changes in this revision

Viewing changes to input/flac/FlacStream.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Hubert Chathi
  • Date: 2007-10-10 15:33:10 UTC
  • mto: (9.2.5 sid)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20071010153310-h3holq75eu2cigb0
Tags: upstream-0.99.80~rc4
ImportĀ upstreamĀ versionĀ 0.99.80~rc4

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
//
5
5
// Copyright (c) 2002 by Drew Hess <dhess@bothan.net>
6
6
//
7
 
//    This program is free software; you can redistribute it and/or modify
8
 
//    it under the terms of the GNU General Public License as published by
9
 
//    the Free Software Foundation; either version 2 of the License, or
10
 
//    (at your option) any later version.
11
 
//
12
 
//    This program is distributed in the hope that it will be useful,
13
 
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
//    GNU General Public License for more details.
16
 
//
17
 
//    You should have received a copy of the GNU General Public License
18
 
//    along with this program; if not, write to the Free Software
19
 
//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
7
/*  This file is part of AlsaPlayer.
 
8
 *
 
9
 *  AlsaPlayer is free software; you can redistribute it and/or modify
 
10
 *  it under the terms of the GNU General Public License as published by
 
11
 *  the Free Software Foundation; either version 3 of the License, or
 
12
 *  (at your option) any later version.
 
13
 *
 
14
 *  AlsaPlayer is distributed in the hope that it will be useful,
 
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 *  GNU General Public License for more details.
 
18
 *
 
19
 *  You should have received a copy of the GNU General Public License
 
20
 *  along with this program; if not, see <http://www.gnu.org/licenses/>.
 
21
 */
20
22
//-------------------------------------------------------------------------
21
23
 
22
24
#include "FlacEngine.h"
321
323
 
322
324
 
323
325
FLAC__StreamDecoderReadStatus
 
326
#ifdef LEGACY_FLAC
324
327
FlacStream::realReadCallBack (FLAC__byte buffer[], unsigned * bytes)
 
328
#else
 
329
FlacStream::realReadCallBack (FLAC__byte buffer[], size_t * bytes)
 
330
#endif
325
331
{
326
332
    *bytes = reader_read (buffer, *bytes, _datasource);
327
333
    return *bytes > 0 ? FLAC__STREAM_DECODER_READ_STATUS_CONTINUE :
336
342
FLAC__StreamDecoderReadStatus
337
343
FlacStream::readCallBack (const FLAC__StreamDecoder *,
338
344
                          FLAC__byte buffer[],
 
345
#ifdef LEGACY_FLAC
339
346
                          unsigned * bytes,
 
347
#else
 
348
                          size_t * bytes,
 
349
#endif
340
350
                          void * client_data)
341
351
{
342
352
    if (!client_data)