Le lundi 17 mai 2010 11:03:03, Andrew a écrit :
> Ok, great. I would be more than happy to test any patches here.
Thanks !
Can you try the attached patch ?
I'm pretty sure it should do the trick but ..
Romain
Index: io/oss_io.ml
===================================================================
--- io/oss_io.ml (révision 7300)
+++ io/oss_io.ml (copie de travail)
@@ -98,9 +98,12 @@
let buf = AFrame.content_of_type ~channels frame 0 in
let len = 2 * (Array.length buf) * (Array.length buf.(0)) in
let s = String.create len in
- let r = Unix.read fd s 0 len in
- (* TODO: recursive read ? *)
- assert (len = r) ;
+ let rec read pos len =
+ if len >0 then
+ let ret = Unix.read fd s pos len in
+ read (pos+ret) (len-ret)
+ in
+ read 0 len ;
Float_pcm.from_s16le buf 0 s 0 (Array.length buf.(0));
AFrame.add_break frame (AFrame.size ())
end
------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users