|
25 | 25 | %% To do check endian
|
26 | 26 | %% I've said Int64 are unsigned-little-integers
|
27 | 27 | %% I think they should be big
|
| 28 | +%% (Edit: Yep, Joe, this hunch was correct for the 'h' type. |
| 29 | +%% I've now fixed it. Sam.) |
| 30 | + |
28 | 31 |
|
29 | 32 | %% The OSC spec is unclear about this point
|
30 | 33 |
|
@@ -96,7 +99,7 @@ encode_arg(X) when is_list(X) -> encode_string(X);
|
96 | 99 | encode_arg(X) when is_atom(X) -> encode_string(atom_to_list(X));
|
97 | 100 | encode_arg(X) when is_integer(X) -> <<X:32>>;
|
98 | 101 | encode_arg(X) when is_float(X) -> <<X:32/float>>; %
|
99 |
| -encode_arg({int64,X}) -> <<X:64/unsigned-little-integer>>; |
| 102 | +encode_arg({int64,X}) -> <<X:64/big-signed-integer>>; |
100 | 103 | encode_arg(X) when is_binary(X) -> encode_binary(X).
|
101 | 104 |
|
102 | 105 | %% bundles
|
@@ -163,7 +166,7 @@ get_args([$i|T1], <<I:32/signed-integer,T2/binary>>, L) ->
|
163 | 166 | get_args(T1, T2, [I|L]);
|
164 | 167 | get_args([$f|T1], <<F:32/float, T2/binary>>, L) ->
|
165 | 168 | get_args(T1, T2, [F|L]);
|
166 |
| -get_args([$h|T1], <<I:64/unsigned-little-integer, T2/binary>>, L) -> |
| 169 | +get_args([$h|T1], <<I:64/big-signed-integer, T2/binary>>, L) -> |
167 | 170 | get_args(T1, T2, [{int64,I}|L]);
|
168 | 171 | get_args([$d|T1], <<Double:64/float, T2/binary>>, L) ->
|
169 | 172 | get_args(T1, T2, [Double|L]);
|
|
0 commit comments