Permalink
Browse files

2009-03-23 Atsushi Enomoto <atsushi@ximian.com>

        * Makefile,
          csogg/StreamState.cs,
          csvorbis/Info.cs,
          csvorbis/Comment.cs,
          csvorbis/VorbisFile.cs :
          add build option for moonlight.


svn path=/trunk/csvorbis/; revision=130023
  • Loading branch information...
1 parent b33bb11 commit e3b2e3419bee442d42758a3e17d6ce8b3e2faa07 @atsushieno atsushieno committed Mar 23, 2009
Showing with 30 additions and 10 deletions.
  1. +9 −0 ChangeLog
  2. +7 −0 Makefile
  3. +1 −1 csogg/StreamState.cs
  4. +6 −6 csvorbis/Comment.cs
  5. +3 −3 csvorbis/Info.cs
  6. +4 −0 csvorbis/VorbisFile.cs
View
@@ -1,3 +1,12 @@
+2009-03-23 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Makefile,
+ csogg/StreamState.cs,
+ csvorbis/Info.cs,
+ csvorbis/Comment.cs,
+ csvorbis/VorbisFile.cs :
+ add build option for moonlight.
+
2002-07-11 Alp Toker <alp@atoker.com>
* csvorbis/VorbisFile.cs: Open files read only, make read() public and
View
@@ -1,6 +1,7 @@
DIRS=csogg csvorbis OggDecoder
CSC=csc
MCS=mcs
+SMCS="smcs -d:NET_2_1"
all: unix
@@ -10,6 +11,12 @@ windows:
(cd $$i; CSC=$(CSC) make windows) || exit 1;\
done;
+moon:
+ -mkdir bin
+ for i in $(DIRS); do \
+ (cd $$i; MCS=$(SMCS) make) || exit 1;\
+ done;
+
unix:
-mkdir bin
for i in $(DIRS); do \
View
@@ -452,7 +452,7 @@ public int flush(Page og)
/* construct the header in temp storage */
String oggs_str = "OggS";
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
byte[] oggs_byt = AE.GetBytes(oggs_str);
Array.Copy(oggs_byt, 0, header, 0, oggs_byt.Length);
View
@@ -54,7 +54,7 @@ public void init()
public void add(String comment)
{
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
byte[] comment_byt = AE.GetBytes(comment);
add(comment_byt);
}
@@ -124,7 +124,7 @@ public String query(String tag)
public String query(String tag, int count)
{
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
byte[] tag_byt = AE.GetBytes(tag);
int foo=query(tag_byt, count);
@@ -217,7 +217,7 @@ int pack(csBuffer opb)
{
String temp="Xiphophorus libVorbis I 20000508";
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
byte[] temp_byt = AE.GetBytes(temp);
byte[] _vorbis_byt = AE.GetBytes(_vorbis);
@@ -278,14 +278,14 @@ internal void clear()
public String getVendor()
{
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
char[] vendor_uni = AE.GetChars(vendor);
return new String(vendor_uni);
}
public String getComment(int i)
{
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
if(comments<=i)return null;
char[] user_comments_uni = AE.GetChars(user_comments[i]);
@@ -294,7 +294,7 @@ public String getComment(int i)
public String toString()
{
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
String long_string = "Vendor: " + new String(AE.GetChars(vendor));
for(int i=0; i < comments; i++)
View
@@ -415,7 +415,7 @@ public int synthesis_headerin(Comment vc, Packet op)
// pack side
int pack_info(csBuffer opb)
{
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
byte[] _vorbis_byt = AE.GetBytes(_vorbis);
// preamble
@@ -439,7 +439,7 @@ int pack_info(csBuffer opb)
int pack_books(csBuffer opb)
{
- ASCIIEncoding AE = new ASCIIEncoding();
+ Encoding AE = Encoding.UTF8;
byte[] _vorbis_byt = AE.GetBytes(_vorbis);
opb.write(0x05,8);
@@ -571,4 +571,4 @@ public String toString()
bitrate_lower.ToString();
}
}
-}
+}
View
@@ -394,7 +394,11 @@ void prefetch_all_headers(Info first_i,Comment first_c, int dataoffset)
int make_decode_ready()
{
+#if NET_2_1
+ if(decode_ready) throw new Exception ("make_decode_ready: 1");
+#else
if(decode_ready)Environment.Exit(1);
+#endif
vd.synthesis_init(vi[0]);
vb.init(vd);
decode_ready=true;

0 comments on commit e3b2e34

Please sign in to comment.