Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Julia v4 syntax fixes and added the ability to use a non-default audio device #51

Closed
wants to merge 42 commits into from

Conversation

wherrera10
Copy link

Two sets of changes:

  1. Changes to several files to clean up syntax warnings with v4.0. This used the Compat module.
  2. Added code to open non-default device for input or output streams. An example of such usage is placed in an added test file.

Add methods to use audio streams other than the default output stream
Add compatibility from 0.3 to 0.4
compatibility of union syntax from 0.3 to 0.4
compatibility 0.3 -> 0.4 changes
@ssfrr
Copy link
Owner

ssfrr commented Nov 12, 2015

I fixed things up so that the tests run and pushed to the wherrera10_test branch, as well as fixing some more 0.4 incompatibilities and removing some extra @compats. (You don't need @compat to use new type names as they're just typealiases in the Compat package).

Would you mind some usage examples to the README showing how to use the new functionality? I briefly looked through but it wasn't clear to me what was the public vs private interface for the new features.

If possible it would be great to see tests as well (now that the test suite passes! 😏), though I know that could be tough with the stuff that directly interfaces with the hardware.

@wherrera10
Copy link
Author

I think that the public interface would be
Pa_OpenStream,
which returns a stream with public interface as a
Pa_AudioStream,

with the functions

read_Pa_AudioStream and
write_Pa_AudioStream

for blocking I/O and reads or writes, or direct use of the
Pa_audiostram.sbuffer as a read or write buffer in non-blocking code.

I'll try to push a test file and a modified README over to the test branch.

--Bill

On Thu, Nov 12, 2015 at 5:20 AM, Spencer Russell notifications@github.com
wrote:

I fixed things up so that the tests run and pushed to the wherrera10_test
branch, as well as fixing some more 0.4 incompatibilities and removing some
extra @compats. (You don't need @compat to use new type names as they're
just typealiases in the Compat package).

Would you mind some usage examples to the README showing how to use the
new functionality? I briefly looked through but it wasn't clear to me what
was the public vs private interface for the new features.

If possible it would be great to see tests as well (now that the test
suite passes! [image: 😏]), though I know that could be tough with
the stuff that directly interfaces with the hardware.


Reply to this email directly or view it on GitHub
#51 (comment).

@wherrera10
Copy link
Author

I fixed some of the added code a bit and added a callback functionality as
well (part of the portaudio package). The callback functionality involves
passing function pointers and buffers between C and julia and calling julia
from C, so that part (callbacks) needs testing and is still experimental.

On Thu, Nov 12, 2015 at 5:20 AM, Spencer Russell notifications@github.com
wrote:

I fixed things up so that the tests run and pushed to the wherrera10_test
branch, as well as fixing some more 0.4 incompatibilities and removing some
extra @compats. (You don't need @compat to use new type names as they're
just typealiases in the Compat package).

Would you mind some usage examples to the README showing how to use the
new functionality? I briefly looked through but it wasn't clear to me what
was the public vs private interface for the new features.

If possible it would be great to see tests as well (now that the test
suite passes! [image: 😏]), though I know that could be tough with
the stuff that directly interfaces with the hardware.


Reply to this email directly or view it on GitHub
#51 (comment).

@wherrera10
Copy link
Author

Okay, the callback I/O is done, but is not as pretty because Julia cannot
send closure information in a C callback for some reason.

On Thu, Nov 12, 2015 at 5:20 AM, Spencer Russell notifications@github.com
wrote:

I fixed things up so that the tests run and pushed to the wherrera10_test
branch, as well as fixing some more 0.4 incompatibilities and removing some
extra @compats. (You don't need @compat to use new type names as they're
just typealiases in the Compat package).

Would you mind some usage examples to the README showing how to use the
new functionality? I briefly looked through but it wasn't clear to me what
was the public vs private interface for the new features.

If possible it would be great to see tests as well (now that the test
suite passes! [image: 😏]), though I know that could be tough with
the stuff that directly interfaces with the hardware.


Reply to this email directly or view it on GitHub
#51 (comment).

@wherrera10
Copy link
Author

Added callbacks and cleaned up blocking I/O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants