<div dir="ltr"><div>Marshall,</div><div><br></div><div>Passing around byte vectors you probably want to do as u8vector scheme-object:s. I would guess right now you have a translation problem between the C and Scheme world of your buffer data pointer, and maybe that whole thing is messed up so it's surprising your program doesn't crash. foreign-address is your friend also.</div><div><br></div><div><br></div><div><br><div class="gmail_quote">2015-05-20 23:53 GMT+05:30 Marshall MasonĀ <span dir="ltr"><<a href="mailto:marshallmason2@gmail.com" target="_blank">marshallmason2@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br></div>I'm new to Gambit, and to help me learn it, I'm trying to interface with some C libraries, libao and libvorbisfile. It should play a simple Ogg Vorbis sound file. It compiles and runs without error, but no sound is played. I'm wondering if someone can help me with it. Here is the code:<br><a href="http://pastie.org/10199051" target="_blank">http://pastie.org/10199051</a><br><br></div>I've narrowed the culprit to the named let toward the bottom, called read-some. If, instead of this, I just implemented the whole loop in C, it works. Here is the code that works:<br><a href="http://pastie.org/10199086" target="_blank">http://pastie.org/10199086</a><br><br></div><div>Although this works, I'd like to understand why it doesn't work the first way. My suspicion is that this has something to do with the character array that holds the decoded buffer, called *pcmout*. I've tried using a nonnull-char-string, but this created errors, so I created a make-char-array function, to ensure that the string was the proper size. The manual was unclear about how to do that.<br><br></div><div>Anyone want to take a stab at this? Here's the version of Gambit I'm using:<br><br></div>v4.7.4 20150228031125 x86_64-unknown-linux-gnu "./configure '--enable-single-host' '--enable-c-opt' '--enable-gcc-opts'"<br><br></div><div>Thanks,<br></div><div>Marshall<br></div></div><br>_______________________________________________<br>Gambit-list mailing list<br><a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br><a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br><br></blockquote></div></div></div>