[Cvs-annodex] commit (annodex): libfishsound/trunk/include/fishsound/decode.h libfishsound/trunk/include/fishsound/fishsound.h libfishsound/trunk/src/examples/fishsound-decenc.c libfishsound/trunk/src/examples/fishsound-decode.c libfishsound/trunk/src/examples/fishsound-encdec.c libfishsound/trunk/src/examples/fishsound-info.c

giles nobody at lists.annodex.net
Sun Oct 22 19:58:01 UTC 2006


Update of /var/local/lib/svn/annodex (new revision 2535)

Modified files:
   libfishsound/trunk/include/fishsound/decode.h
   libfishsound/trunk/include/fishsound/fishsound.h
   libfishsound/trunk/src/examples/fishsound-decenc.c
   libfishsound/trunk/src/examples/fishsound-decode.c
   libfishsound/trunk/src/examples/fishsound-encdec.c
   libfishsound/trunk/src/examples/fishsound-info.c

Log Message:
Propagate documentation improvements from the 1.0-stable branch, 
r2533 and r2534.


Modified: libfishsound/trunk/include/fishsound/decode.h
===================================================================
--- libfishsound/trunk/include/fishsound/decode.h	2006-10-22 19:45:54 UTC (rev 2534)
+++ libfishsound/trunk/include/fishsound/decode.h	2006-10-22 19:57:56 UTC (rev 2535)
@@ -266,10 +266,12 @@
 				       void * user_data);
 
 /**
- * Decode a block of data
+ * Decode a block of data.
+ * No internal buffering is done, so a complete compressed audio packet
+ * must be passed each time.
  * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE)
- * \param buf A buffer of data
- * \param bytes A count of bytes to decode (ie. the length of buf)
+ * \param buf A buffer containing a compressed audio packet
+ * \param bytes A count of bytes to decode (i.e. the length of buf)
  * \returns The number of bytes consumed
  * \retval FISH_SOUND_ERR_STOP_OK Decoding was stopped by a FishSoundDecode*
  * callback returning FISH_SOUND_STOP_OK before any input bytes were consumed.

Modified: libfishsound/trunk/include/fishsound/fishsound.h
===================================================================
--- libfishsound/trunk/include/fishsound/fishsound.h	2006-10-22 19:45:54 UTC (rev 2534)
+++ libfishsound/trunk/include/fishsound/fishsound.h	2006-10-22 19:57:56 UTC (rev 2535)
@@ -439,7 +439,7 @@
 /**
  * Instantiate a new FishSound* handle
  * \param mode FISH_SOUND_DECODE or FISH_SOUND_ENCODE
- * \param fsinfo
+ * \param fsinfo Encoder configuration, may be NULL for FISH_SOUND_DECODE
  * \returns A new FishSound* handle, or NULL on error
  */
 FishSound * fish_sound_new (int mode, FishSoundInfo * fsinfo);

Modified: libfishsound/trunk/src/examples/fishsound-decenc.c
===================================================================
--- libfishsound/trunk/src/examples/fishsound-decenc.c	2006-10-22 19:45:54 UTC (rev 2534)
+++ libfishsound/trunk/src/examples/fishsound-decenc.c	2006-10-22 19:57:56 UTC (rev 2535)
@@ -147,7 +147,7 @@
   oggz_set_read_callback (ed->oggz_in, -1, read_packet, ed);
   ed->serialno = oggz_serialno_new (ed->oggz_out);
 
-  ed->decoder = fish_sound_new (FISH_SOUND_DECODE, &fsinfo);
+  ed->decoder = fish_sound_new (FISH_SOUND_DECODE, NULL);
 
   fish_sound_set_interleave (ed->decoder, interleave);
 
@@ -156,7 +156,7 @@
   ed->format = format;
   ed->begun = 0;
   ed->b_o_s = 1;
-  ed->channels = fsinfo.channels;
+  ed->channels = fsinfo.channels; /* FIXME: fsinfo is unitialized! */
   ed->interleave = interleave;
 
   if (interleave) {

Modified: libfishsound/trunk/src/examples/fishsound-decode.c
===================================================================
--- libfishsound/trunk/src/examples/fishsound-decode.c	2006-10-22 19:45:54 UTC (rev 2534)
+++ libfishsound/trunk/src/examples/fishsound-decode.c	2006-10-22 19:57:56 UTC (rev 2535)
@@ -119,7 +119,7 @@
   infilename = argv[1];
   outfilename = argv[2];
 
-  fsound = fish_sound_new (FISH_SOUND_DECODE, &fsinfo);
+  fsound = fish_sound_new (FISH_SOUND_DECODE, NULL);
 
   fish_sound_set_interleave (fsound, 1);
 

Modified: libfishsound/trunk/src/examples/fishsound-encdec.c
===================================================================
--- libfishsound/trunk/src/examples/fishsound-encdec.c	2006-10-22 19:45:54 UTC (rev 2534)
+++ libfishsound/trunk/src/examples/fishsound-encdec.c	2006-10-22 19:57:56 UTC (rev 2535)
@@ -105,7 +105,7 @@
   fsinfo.format = format;
 
   ed->encoder = fish_sound_new (FISH_SOUND_ENCODE, &fsinfo);
-  ed->decoder = fish_sound_new (FISH_SOUND_DECODE, &fsinfo);
+  ed->decoder = fish_sound_new (FISH_SOUND_DECODE, NULL);
 
   fish_sound_set_interleave (ed->encoder, 1);
   fish_sound_set_interleave (ed->decoder, 1);

Modified: libfishsound/trunk/src/examples/fishsound-info.c
===================================================================
--- libfishsound/trunk/src/examples/fishsound-info.c	2006-10-22 19:45:54 UTC (rev 2534)
+++ libfishsound/trunk/src/examples/fishsound-info.c	2006-10-22 19:57:56 UTC (rev 2535)
@@ -41,7 +41,6 @@
 
 static char * infilename;
 static int begun = 0;
-static FishSoundInfo fsinfo;
 
 static void
 read_comments (FishSound * fsound)
@@ -99,7 +98,7 @@
 
   infilename = argv[1];
 
-  fsound = fish_sound_new (FISH_SOUND_DECODE, &fsinfo);
+  fsound = fish_sound_new (FISH_SOUND_DECODE, NULL);
   fish_sound_set_interleave (fsound, 1);
   fish_sound_set_decoded_float_ilv (fsound, decoded, NULL);
 


-- 
giles



More information about the cvs-annodex mailing list