gaRecSampleStop(int)

Syntax

gaRecSampleStop(int)

Example

record = false
numRecordings = 0

function setup()
 ofSetCircleResolution(50)
end

function update()
 
end

function draw()
 gaBackground(0.0,1.0)
 
 ofSetColor(255,125,55)
 ofDrawBitmapString(string.format("Samples recorded: %i",numRecordings),200,200)

 if record then
 ofSetColor(255,0,0)
 ofCircle(OUTPUT_W/2,OUTPUT_H/2,100)
 end

end

function mouseReleased()
 if numRecordings>0 then
 for i=0, numRecordings-1 do
 gaRecSampleVolume(i,1.0)
 gaRecSampleLooping(i,true)
 gaRecSamplePlay(i)
 gaRecSampleSpeed(i,1.0)
 end
 end
end

function keyReleased()
 if gaKey() == string.byte(' ') then
     record = not record
 
     if record then
         gaStartRec(0)
     else
         gaStopRec()
         numRecordings = numRecordings + 1
     end
 elseif gaKey() == string.byte('s') then
     for i=0,numRecordings-1 do
          gaRecSampleStop(i)
     end
 end
end

Description

Stop the previously recorded audio sample with the specified index. Sample's index starts at zero.

Parameters

int