that sounds great!
I'd love to see dolby support for FusionSound. I've got a SB Audigy 2, like Denis, with 7.1 output. I also have FusionSound on an ipaq 5550, so if you need performance testing or dolby testing, maybe I can help.

cheers,

Roel


On May 20, 2005, at 15:21, Claudio Ciccani wrote:

If nobody has objections, I'd like to take care of FusionSound for a while.
I plan to add support for multichannel output (up to 5, real dolby sorround) and probably 24/32 bit sampleformats (supported by newer cards), complete the IFusionSoundPlayback interface (add support
for Amplitude and Equalization control, ...), review the FusionSoundMusicProvider interface.

I have attached the reviewed IFusionSoundMusicProvider API.
If you have suggestions (or comments), ....

--
Regards,
�� � Claudio Ciccani

--- FusionSound/include/fusionsound.h� � 2004-05-09 23:46:50.000000000 +0200
+++ /home/klan/src/FusionSound/include/fusionsound.h� � 2005-05-20 14:53:29.000000000 +0200
@@ -177,6 +177,39 @@
} FSMusicProviderCapabilities;


/*
+ * Track ID.
+ */
+typedef unsigned long FSTrackID;
+
+#define FS_TRACK_DESC_ARTIST_LENGTH 32
+#define FS_TRACK_DESC_TITLE_LENGTH� � 125
+#define FS_TRACK_DESC_ALBUM_LENGTH� � 125
+#define FS_TRACK_DESC_GENRE_LENGTH� � 32
+#define FS_TRACK_DESC_ENCODING_LENGTH 32
+
+/*
+ * Description of a track provided by a music provider.
+ */
+typedef struct {
+ � � charartist[FS_TRACK_DESC_ARTIST_LENGTH]; � � /* Artist */
+ � � chartitle[FS_TRACK_DESC_TITLE_LENGTH]; � � � /* Title */
+ � � charalbum[FS_TRACK_DESC_ALBUM_LENGTH]; � � � /* Album */
+ � � short year;� � � � � � � � � � � � � � � � � � /* Year */
+ � � chargenre[FS_TRACK_DESC_GENRE_LENGTH]; � � � /* Genre */
+ � � charencoding[FS_TRACK_DESC_ENCODING_LENGTH]; /* Encoding (for example: MPEG Layer-1) */
+ � � int bitrate; � � � � � � � � � � � � � � � � /* Bitrate in bit/s */
+} FSTrackDescription;
+
+/*
+ * Called for each track provided by a music provider.
+ */
+typedef DFBEnumerationResult (*FSTrackCallback) (
+ � � FSTrackID� � � � � � � � track_id,
+ � � FSTrackDescription � � � desc,
+ � � void� � � � � � � � � � *callbackdata
+);
+
+/*
* <i><b>IFusionSound</b></i> is the main FusionSound interface. Currently it
* can only be retrieved by calling <i>IDirectFB::GetInterface()</i>. This will
* change when Fusion and other relevant parts of DirectFB are dumped into a
@@ -634,6 +667,11 @@
)


/*
+ * Called after each buffer write.
+ */
+typedef void (*FMBufferCallback)( int length, void *ctx );
+
+/*
* <i>No summary yet...</i>
*/
DEFINE_INTERFACE( IFusionSoundMusicProvider,
@@ -649,26 +687,91 @@
� � � );


� � � /*
-� � � * Get a surface description that best matches the music
+� � � * Enumerate all tracks contained in the file.
+� � � *
+� � � * Calls the given callback for all available tracks.<br>
+� � � * The callback is passed the track id that can be
+� � � * used to select a track for playback using
+� � � * IFusionSoundMusicProvider::SelectTrack().
+� � � */
+ � � DFBResult (*EnumTracks) (
+� � � � � IFusionSoundMusicProvider *thiz,
+� � � � � FSTrackCallback� � � � � � callback,
+� � � � � void� � � � � � � � � � � *callbackdata
+ � � );
+
+ � � /*
+� � � * Get the unique ID of the current track.
+� � � */
+ � � DFBResult (*GetTrackID) (
+� � � � � IFusionSoundMusicProvider *thiz,
+� � � � � FSTrackID � � � � � � � � *ret_track_id
+ � � );
+
+ � � /*
+� � � * Get a description of the current track.
+� � � */
+ � � DFBResult (*GetTrackDescription) (
+� � � � � IFusionSoundMusicProvider *thiz,
+� � � � � FSTrackDescription� � � � *desc
+ � � );
+
+ � � /*
+� � � * Get a stream description that best matches the music
�� � � * contained in the file.
�� � � */
� � � DFBResult (*GetStreamDescription) (
�� � � � � IFusionSoundMusicProvider *thiz,
�� � � � � FSStreamDescription � � � *desc
� � � );
+� � �
+ � � /*
+� � � * Get a buffer description that best matches the music
+� � � * contained in the file.
+� � � */
+ � � DFBResult (*GetBufferDescription) (
+� � � � � IFusionSoundMusicProvider *thiz,
+� � � � � FSBufferDescription � � � *desc
+ � � );


� � /** Playback **/


� � � /*
-� � � * Play music rendering it into the destination stream.
+� � � * Select a track by its unique ID.
�� � � */
- � � DFBResult (*PlayTo) (
+ � � DFBResult (*SelectTrack) (
+� � � � � IFusionSoundMusicProvider *thiz,
+� � � � � FSTrackID� � � � � � � � � track_id
+ � � );
+� � �
+ � � /*
+� � � * Play selected track rendering it into
+� � � * the destination stream.
+� � � */
+ � � DFBResult (*PlayToStream) (
�� � � � � IFusionSoundMusicProvider *thiz,
�� � � � � IFusionSoundStream� � � � *destination
� � � );


� � � /*
-� � � * Stop rendering into the destination stream.
+� � � * Play selected track rendering it into
+� � � * the destination buffer.
+� � � *
+� � � * Optionally a callback can be registered
+� � � * that is called after each buffer write.<br>
+� � � * The callback is passed the number of
+� � � * samples per channels actually written
+� � � * to the destination buffer.
+� � � */
+ � � DFBResult (*PlayToBuffer) (
+� � � � � IFusionSoundMusicProvider *thiz,
+� � � � � IFusionSoundBuffer� � � � *destination,
+� � � � � FMBufferCallback � � � � � callback,
+� � � � � void� � � � � � � � � � � *ctx
+ � � );
+
+ � � /*
+� � � * Stop playback.
�� � � */
� � � DFBResult (*Stop) (
�� � � � � IFusionSoundMusicProvider *thiz
@@ -677,7 +780,7 @@
� � /** Media Control **/


� � � /*
-� � � * Seeks to a position within the stream.
+� � � * Seeks to a position within the current track.
�� � � */
� � � DFBResult (*SeekTo) (
�� � � � � IFusionSoundMusicProvider *thiz,
@@ -685,7 +788,10 @@
� � � );


� � � /*
-� � � * Gets current position within the stream.
+� � � * Gets current position within the current track.
+� � � *
+� � � * Returns <b>DFB_EOF</b> if the playback
+� � � * of the current track is finished.
�� � � */
� � � DFBResult (*GetPos) (
�� � � � � IFusionSoundMusicProvider *thiz,
@@ -693,7 +799,7 @@
� � � );


� � � /*
-� � � * Gets the length of the stream.
+� � � * Gets the length of the current track.
�� � � */
� � � DFBResult (*GetLength) (
�� � � � � IFusionSoundMusicProvider *thiz,
_______________________________________________
directfb-dev mailing list


--

"In the beginning the Universe was created. Ths has made a lot of people very angry and been widely regarded as a bad move"

� � --Douglas Adams


_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to