Explicitly include a boost "windows" folder even on linux
[supercollider.git] / HelpSource / Classes / BufSampleRate.schelp
blob5b14dc655e0eac2d7e3db9b6b8890bc4e518d3aa
1 class:: BufSampleRate
2 summary:: Buffer sample rate.
3 related:: Classes/BufChannels, Classes/BufDur, Classes/BufFrames, Classes/BufRateScale, Classes/BufSamples
4 categories::  UGens>Buffer>Info
7 Description::
8 Returns the buffer's current sample rate.
10 classmethods::
12 method::kr, ir
14 argument::bufnum
15 Buffer index.
17 returns::
18 the buffer's current sample rate.
20 discussion::
21 warning::
22 The  code::.ir::  method is not the safest choice.
23 Since a buffer can be reallocated at any time, using
24 code::.ir::  will not track the changes.
27 Examples::
29 code::
30 b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
32 // compares a 1102.5 Hz sine tone (11025 * 0.1, left) with a 1100 Hz tone (right)
33 // the apollo sample has a sample rate of 11.025 kHz
36         var freq;
37         freq = [ BufSampleRate.kr(b) * 0.1, 1100];
38         SinOsc.ar(freq, 0, 0.1)
39 }.play;
42 b.free;