Update save file example in README.md (#102)
* Update save file example in README.md * Update README.md Co-authored-by: Jeff Fessler <JeffFessler@users.noreply.github.com> * Update README.md Co-authored-by: Jeff Fessler <JeffFessler@users.noreply.github.com> * Update README.md Co-authored-by: Jeff Fessler <JeffFessler@users.noreply.github.com> * Remove extra stream Co-authored-by: bramtayl <brandon.taylor221@gmail.com> Co-authored-by: Jeff Fessler <JeffFessler@users.noreply.github.com>
This commit is contained in:
parent
24acc0247b
commit
497567e329
1 changed files with 8 additions and 2 deletions
10
README.md
10
README.md
|
@ -83,9 +83,15 @@ end
|
||||||
### Record 10 seconds of audio and save to an ogg file
|
### Record 10 seconds of audio and save to an ogg file
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
julia> using PortAudio, SampledSignals, LibSndFile
|
julia> import LibSndFile # must be in Manifest for FileIO.save to work
|
||||||
|
|
||||||
julia> stream = PortAudioStream("Built-in Microph", 2, 0)
|
julia> using PortAudio: PortAudioStream
|
||||||
|
|
||||||
|
julia> using SampledSignals: s
|
||||||
|
|
||||||
|
julia> using FileIO: save
|
||||||
|
|
||||||
|
julia> stream = PortAudioStream(1, 0) # default input (e.g., built-in microphone)
|
||||||
PortAudio.PortAudioStream{Float32,SIUnits.SIQuantity{Int64,0,0,-1,0,0,0,0,0,0}}
|
PortAudio.PortAudioStream{Float32,SIUnits.SIQuantity{Int64,0,0,-1,0,0,0,0,0,0}}
|
||||||
Samplerate: 48000 s⁻¹
|
Samplerate: 48000 s⁻¹
|
||||||
Buffer Size: 4096 frames
|
Buffer Size: 4096 frames
|
||||||
|
|
Loading…
Reference in a new issue