<div dir="ltr">Eric,<br><br>I was hoping to use a packed format like ByteString eventually. Right now, I want to get everything working nicely. As it stands, I end up marshaling a lot of information into/out of arrays which I&#39;d much rather keep as a block of memory.<br>
<br>I&#39;m guessing that some sort of unboxed array would be close to what I want. If you have suggestions, I&#39;m more than open to them. (This is my first attempt at writing a library.)<br><br>/jve<br><br><div class="gmail_quote">
On Sun, Aug 24, 2008 at 1:06 PM, Eric Kidd <span dir="ltr">&lt;<a href="mailto:haskell@randomhacks.net">haskell@randomhacks.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Sun, Aug 24, 2008 at 12:41 PM, John Van Enk &lt;<a href="mailto:vanenkj@gmail.com">vanenkj@gmail.com</a>&gt; wrote:<br>
&gt; It implements the Haskell bindings to the PortAudio library. This is the<br>
&gt; library behind Audacious. I *have not* implemented the callback model yet,<br>
&gt; but I plan to do that.<br>
&gt;<br>
&gt; Perhaps this will be something which is useful to you?<br>
<br>
</div>Looks like a great binding! We actually use portaudio in callback mode<br>
at work, with reasonable success (from C++).<br>
<br>
One question: I notice that your writeStream function represents audio<br>
using &#39;[[a]]&#39;.<br>
<br>
 &nbsp;writeStream :: (Storable a) =&gt; PaStream a -- ^ The output stream<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; [[a]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- ^ The samples to be played<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; Int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- ^ Number of frames<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; IO (Either String ErrorCode) -- ^ The return status<br>
of the write<br>
<br>
In my experiments, I&#39;ve been somewhat unsatisfied with the performance<br>
of &#39;[[a]]&#39; as an audio format. Would you be interested in also<br>
supporting an array-based format for audio data?<br>
<br>
I&#39;m currently converting my program to use HCodec&#39;s Data.Audio<br>
representation, which looks pretty promising. I don&#39;t know how it<br>
performs yet, but I&#39;ll let you know.<br>
<br>
Thank you for the pointer to your library! It will make an excellent<br>
addition to the available Haskell sound libraries.<br>
<br>
Cheers,<br>
<font color="#888888">Eric<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>/jve<br>
</div>