[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSSound and gsnd
Re: NSSound and gsnd
Thu, 01 Aug 2002 08:33:12 -0400
I agree that NSSound should be simple.
I think I should emphsize my point on gsnd.
Right now, gsnd only accept the whole decoded data,
which cause the problem for big files.
And since gsnd is the official sound daemon of GNUstep,
it would be nice that it could offer some other interfaces
that applications can feed the data piece by piece.
Do you have any plan to do that ?
By the way, maybe libsndfile
could be another choice as external library.
It is highly portable, and I think the most
important point is that it is still under active developement.
That's just a little suggestion.
From: Enrico Sersale <address@hidden>
To: Yen-Ju Chen <address@hidden>
Subject: Re: NSSound and gsnd
Date: Thu, 1 Aug 2002 13:24:17 +0300 (EEST)
On Wed, 31 Jul 2002, Yen-Ju Chen wrote:
> I just notice that NSSound and gsnd are in CVS.
> And it seems that NSSound will decode the whole file at once.
> If I want to write a NSSound subclass which can handle MP3/OGG,
> it will takes a lot of time to decode the whole file
> before sent them into gsnd.
> Is there any way, or plan, that NSSound can send the data
> piece by piece to gsnd so that it doesn't need to decode
> the whole file at once.
If you want to see an example of sound class that plays from a stream,
take a look at the MusicKit. I think that it does exactly wath you want.
Writing this implementation of NSSound I wanted only to create a simple,
portable and efficient interface to play "system sounds". It is part of
the gui library and my concern was to not add, how is possible,
dependencies on external libraries, threads or other strange things. The
only external library used is libaudiofile, a very portable c library that
builds on many unix and on windows.
I've not a Mac to test this, but I think that also the apple
implementation doesn't do much more. From their documentation: "The
NSSound class provides a simple interface for loading and playing AIFF,
WAV, and NeXT ".snd" files. NSSound supports 16bit, mono and stereo,
44.1KHz and 22.05KHz data." (BTW actually we support more formats and any
Said that, I must also add that gsnd is an other think. Not being a part
of gui but only a tool, I think that it could be easyly modified to accept
also, for example, a NSFileHandle or a NSPipe from which read the data to
Join the worlds largest e-mail service with MSN Hotmail.
- Re: NSSound and gsnd, Enrico Sersale, 2002/08/01
- Re: NSSound and gsnd,
Yen-Ju Chen <=
- Re: NSSound and gsnd, Yen-Ju Chen, 2002/08/01
- RE: NSSound and gsnd, Peron, Stéphane, 2002/08/02
- Re: NSSound and gsnd, Yen-Ju Chen, 2002/08/02
- Re: NSSound and gsnd, Yen-Ju Chen, 2002/08/08