# HG changeset patch
# User mas01mj
# Date 1272641468 0
# Node ID 14b48e1b9ca42a169bfa60f059a044efdf62c8b5
# Parent 6d8539709d9c2285a80fd0f5c23cbece3ba07055
Fix to start vector / length (ta Christophe!)
diff -r 6d8539709d9c -r 14b48e1b9ca4 examples/iAudioDB/AppController.m
--- a/examples/iAudioDB/AppController.m Fri Apr 30 14:57:30 2010 +0000
+++ b/examples/iAudioDB/AppController.m Fri Apr 30 15:31:08 2010 +0000
@@ -670,7 +670,7 @@
{
if(lengthSecs >= 0)
{
- lengthVectors = ceil(((lengthSecs*sampleRate)-winSize)/hopSize);
+ lengthVectors = ceil((((lengthSecs*sampleRate)-winSize)/hopSize)+1);
if(lengthVectors < 0) {lengthVectors = 0; }
[queryLengthVectors setDoubleValue:lengthVectors];
}
@@ -680,7 +680,7 @@
{
if(lengthVectors >= 0)
{
- lengthSecs = ((hopSize*lengthVectors)+winSize)/sampleRate;
+ lengthSecs = ((hopSize*(lengthVectors-1))+winSize)/sampleRate;
if(lengthSecs < 0) { lengthSecs = 0; }
[queryLengthSeconds setDoubleValue:lengthSecs];
}
@@ -691,7 +691,7 @@
{
if(startSecs >= 0)
{
- startVectors = ceil(((startSecs*sampleRate)-winSize)/hopSize);
+ startVectors = ceil((startSecs*sampleRate)/hopSize);
if(startVectors < 0) { startVectors = 0; }
[queryStartVectors setDoubleValue:startVectors];
}
@@ -700,7 +700,7 @@
{
if(startVectors >= 0)
{
- startSecs = ((hopSize*startVectors)+winSize)/sampleRate;
+ startSecs = (hopSize*startVectors)/sampleRate;
if(startSecs < 0) { startSecs = 0; }
[queryStartSeconds setDoubleValue:startSecs];
}
diff -r 6d8539709d9c -r 14b48e1b9ca4 examples/iAudioDB/English.lproj/MainMenu.xib
--- a/examples/iAudioDB/English.lproj/MainMenu.xib Fri Apr 30 14:57:30 2010 +0000
+++ b/examples/iAudioDB/English.lproj/MainMenu.xib Fri Apr 30 15:31:08 2010 +0000
@@ -12,7 +12,7 @@
-
+
- 905
+ 909