#158: input.oss is broken with oss4
-------------------------+--------------------------------------------------
Reporter: toots | Owner: toots
Type: Bugs | Status: assigned
Priority: 3 | Milestone:
Component: Liquidsoap | Version: 0.3.7+svn
Resolution: | Keywords:
Mac: 1 | Linux: 1
Netbsd: 1 | Other: 1
Freebsd: 1 |
-------------------------+--------------------------------------------------
Changes (by toots):
* owner: admin => toots
* status: new => assigned
Comment:
The following patch makes it work:
{{{
Index: io/oss_io.ml
===================================================================
--- io/oss_io.ml (révision 5793)
+++ io/oss_io.ml (copie de travail)
@@ -91,9 +91,10 @@
assert (0 = AFrame.position frame) ;
let fd = Utils.get_some fd in
let buf = AFrame.get_float_pcm frame in
- let s = String.create (2 * (Array.length buf) * (Array.length
buf.(0))) in
- let r = Unix.read fd s 0 (String.length s) in
- Float_pcm.from_s16le buf 0 s 0 r;
+ let len = 2 * (Array.length buf) * (Array.length buf.(0)) in
+ let s = String.create len in
+ assert (len = Unix.read fd s 0 len) ;
+ Float_pcm.from_s16le buf 0 s 0 (Array.length buf.(0));
AFrame.add_break frame (AFrame.size frame)
end
}}}
--
Ticket URL: <http://savonet.rastageeks.org/ticket/158#comment:1>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac