[Stk] Getting static sound as output
Avik Pal
avikpal.me at gmail.com
Wed Jun 11 06:47:57 PDT 2014
Hi,
I am new in the field of audio processing and while using STK for my GSoC
project, I have hit a snag for which I need your help.I recorded a .wav
file by doing
gst-launch alsasrc ! audioconvert ! audioresample ! wavenc ! filesink
location=mic.wav
I wrote this code[
https://github.com/avikpal/noise-removal-and-sound-visualization/blob/master/fileIn_stk.cpp]
to simply sample an input file and write that data back to an output file.
But here are few questions that I would like to get answered.
First of all how do I find the no. of frames of the input file? Surely I
can do
StkFrames frames( input.getSize() , 2) -> but this will only return me the
frames per sample but if I am not mistaken I need the frames of all the
samples to get a copy of the input file.
I used sox --info to learn about my input file(here mic.wav) which is [
http://paste.kde.org/p5g2m4zld]. My question is in my code do I need to
iterate over all the samples in the input file by doing.
for(int i=0;i<268427264; i++){ //Knowing the no of
samples from sox --info
output.tick(input.tick(frames));
}
But when I run this I am getting a huge output file(~2.0GB) which has only
static sound. Surely I am missing something.
Any kind of suggestion/help is much appreciated.
Avik Pal
Intern at Google Summer of Code'14
Indian Institute of Engineering Science & Technology,Shibpur
<http://www.becs.ac.in/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20140611/1acd62e8/attachment.html
More information about the Stk
mailing list