File indexing completed on 2024-04-28 16:08:41

0001 /***************************************************************************
0002  *   Copyright (C) 2005-2008 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad*
0003  *   bjoern.nilsen@bjoernen.com & fredrikbk@hotmail.com                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015  *   You should have received a copy of the GNU General Public License     *
0016  *   along with this program; if not, write to the                         *
0017  *   Free Software Foundation, Inc.,                                       *
0018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
0019  ***************************************************************************/
0020 #include "../technical/audio/oggvorbis.h"
0021 
0022 #include <stddef.h>
0023 #include <stdint.h>
0024 
0025 #include "src/domain/animation/workspacefile.h"
0026 
0027 class ErrorHandler;
0028 
0029 // A mock OggVorbis implementation that does nothing.
0030 
0031 OggVorbis::OggVorbis() {
0032     oggFile = NULL;
0033 }
0034 
0035 
0036 OggVorbis::~OggVorbis() {
0037     close();
0038 }
0039 
0040 
0041 void OggVorbis::setFilename(WorkspaceFile& file, ErrorHandler&) {
0042     filename = file;
0043 }
0044 
0045 
0046 int OggVorbis::open() {
0047     return 0;
0048 }
0049 
0050 
0051 void OggVorbis::reset() {
0052 }
0053 
0054 
0055 int OggVorbis::close() {
0056     return 0;
0057 }
0058 
0059 
0060 int OggVorbis::fillBuffer(char*, int numBytes) {
0061     return numBytes;
0062 }
0063 
0064 
0065 int OggVorbis::add16bit(int16_t*, int count) {
0066     return count;
0067 }
0068 
0069 
0070 const char* OggVorbis::getSoundPath() const {
0071     return filename.path();
0072 }
0073 
0074 const char* OggVorbis::getBasename() const {
0075     return filename.basename();
0076 }
0077