comparison data/fileio/OggVorbisFileReader.cpp @ 1343:c380e56c95f5 3.0-integration

Untabify some more
author Chris Cannam
date Fri, 06 Jan 2017 09:50:13 +0000
parents 4704e834d0f9
children 1c9bbbb6116a
comparison
equal deleted inserted replaced
1342:c0fece5e7755 1343:c380e56c95f5
62 62
63 QFileInfo info(m_path); 63 QFileInfo info(m_path);
64 m_fileSize = info.size(); 64 m_fileSize = info.size();
65 65
66 if (!(m_oggz = oggz_open(m_path.toLocal8Bit().data(), OGGZ_READ))) { 66 if (!(m_oggz = oggz_open(m_path.toLocal8Bit().data(), OGGZ_READ))) {
67 m_error = QString("File %1 is not an OGG file.").arg(m_path); 67 m_error = QString("File %1 is not an OGG file.").arg(m_path);
68 return; 68 return;
69 } 69 }
70 70
71 FishSoundInfo fsinfo; 71 FishSoundInfo fsinfo;
72 m_fishSound = fish_sound_new(FISH_SOUND_DECODE, &fsinfo); 72 m_fishSound = fish_sound_new(FISH_SOUND_DECODE, &fsinfo);
73 73
170 return 0; 170 return 0;
171 } 171 }
172 172
173 int 173 int
174 OggVorbisFileReader::acceptFrames(FishSound *fs, float **frames, long nframes, 174 OggVorbisFileReader::acceptFrames(FishSound *fs, float **frames, long nframes,
175 void *data) 175 void *data)
176 { 176 {
177 OggVorbisFileReader *reader = (OggVorbisFileReader *)data; 177 OggVorbisFileReader *reader = (OggVorbisFileReader *)data;
178 178
179 if (!reader->m_commentsRead) { 179 if (!reader->m_commentsRead) {
180 const FishSoundComment *comment; 180 const FishSoundComment *comment;
194 } 194 }
195 reader->m_commentsRead = true; 195 reader->m_commentsRead = true;
196 } 196 }
197 197
198 if (reader->m_channelCount == 0) { 198 if (reader->m_channelCount == 0) {
199 FishSoundInfo fsinfo; 199 FishSoundInfo fsinfo;
200 fish_sound_command(fs, FISH_SOUND_GET_INFO, 200 fish_sound_command(fs, FISH_SOUND_GET_INFO,
201 &fsinfo, sizeof(FishSoundInfo)); 201 &fsinfo, sizeof(FishSoundInfo));
202 reader->m_fileRate = fsinfo.samplerate; 202 reader->m_fileRate = fsinfo.samplerate;
203 reader->m_channelCount = fsinfo.channels; 203 reader->m_channelCount = fsinfo.channels;
204 reader->initialiseDecodeCache(); 204 reader->initialiseDecodeCache();
205 } 205 }
206 206
207 if (nframes > 0) { 207 if (nframes > 0) {
208 reader->addSamplesToDecodeCache(frames, nframes); 208 reader->addSamplesToDecodeCache(frames, nframes);