Skip to content

Commit

Permalink
Switch Code type object to Pointer in null callback
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Oct 3, 2021
1 parent b132f47 commit f76a988
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .layout
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"children": [
{
"type": "file",
"name": "PortAudio.pm"
"name": "PortAudio.rakumod"
}
],
"type": "directory",
Expand All @@ -94,4 +94,4 @@
"name": "README.md"
}
]
}
}
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v0.0.5 Sun 3 Oct 17:27:49 BST 2021
* Switch Code type object for Pointer in NULL Callback
v0.0.4 Wed 12 May 19:12:01 BST 2021
* Renaming and tidying
* Add GH action
Expand Down
4 changes: 2 additions & 2 deletions META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"LibraryCheck"
],
"provides": {
"Audio::PortAudio": "lib/Audio/PortAudio.pm"
"Audio::PortAudio": "lib/Audio/PortAudio.rakumod"
},
"version": "0.0.4",
"version": "0.0.5",
"authors": [
"Jonathan Stowe <[email protected]>"
],
Expand Down
4 changes: 2 additions & 2 deletions lib/Audio/PortAudio.pm → lib/Audio/PortAudio.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ class Audio::PortAudio {
method open-default-stream(Int $input = 0, Int $output = 2, StreamFormat $format = StreamFormat::Float32, Int $sample-rate = 44100, Int $frames-per-buffer = 256 --> Stream ) {
my CArray[Stream] $stream = CArray[Stream].new;
$stream[0] = Stream.new;
my $rc = Pa_OpenDefaultStream($stream,$input,$output,$format.Int, Num($sample-rate), $frames-per-buffer, Code, CArray);
my $rc = Pa_OpenDefaultStream($stream,$input,$output,$format.Int, Num($sample-rate), $frames-per-buffer, Pointer, CArray);
if $rc != 0 {
X::OpenError.new(code => $rc, error-text => self.error-text($rc)).throw;
}
Expand All @@ -1009,7 +1009,7 @@ class Audio::PortAudio {
method open-stream(StreamParameters $in-params, StreamParameters $out-params, Int $sample-rate = 44100, Int $frames-per-buffer = 256 --> Stream ) {
my CArray[Stream] $stream = CArray[Stream].new;
$stream[0] = Stream.new;
my $rc = Pa_OpenStream($stream, $in-params, $out-params, Num($sample-rate), $frames-per-buffer, 0, Code, CArray);
my $rc = Pa_OpenStream($stream, $in-params, $out-params, Num($sample-rate), $frames-per-buffer, 0, Pointer, CArray);
if $rc != 0 {
X::OpenError.new(code => $rc, error-text => self.error-text($rc)).throw;
}
Expand Down

0 comments on commit f76a988

Please sign in to comment.