| 82 | return 0; |
| 83 | } |
| 84 | int Soundfile::create(std::string filename, int framesPerSecond, int channelsPerFrame, int format) |
| 85 | { |
| 86 | close(); |
| 87 | sf_info.samplerate = framesPerSecond; |
| 88 | sf_info.channels = channelsPerFrame; |
| 89 | sf_info.format = format; |
| 90 | sndfile = sf_open(filename.c_str(), SFM_RDWR, &sf_info); |
| 91 | if (!sndfile) { |
| 92 | error(); |
| 93 | return -1; |
| 94 | } |
| 95 | return 0; |
| 96 | } |
| 97 | int Soundfile::seek(int frames, int whence) |
| 98 | { |
| 99 | int frame = sf_seek(sndfile, frames, whence); |
no outgoing calls
no test coverage detected