Switch to unified view
a/mpd2src/wavreader.cpp | b/mpd2src/wavreader.cpp | ||
---|---|---|---|
... |
... |
||
49 | if (!readData()) { |
49 | if (!readData()) { |
50 | cerr << "Can't read file: " << m_fn << endl; |
50 | cerr << "Can't read file: " << m_fn << endl; |
51 | return false; |
51 | return false; |
52 | } |
52 | } |
53 | return true; |
53 | return true; |
54 | } |
||
55 | |||
56 | void WavReader::close() |
||
57 | { |
||
58 | if (m_fp > 0) |
||
59 | fclose(m_fp); |
||
54 | } |
60 | } |
55 | 61 | ||
56 | const unsigned char *WavReader::data(size_t packetbytes, ssize_t &nread) |
62 | const unsigned char *WavReader::data(size_t packetbytes, ssize_t &nread) |
57 | { |
63 | { |
58 | if (m_index + packetbytes <= totalBytes()) { |
64 | if (m_index + packetbytes <= totalBytes()) { |