Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 30459 invoked from network); 4 Sep 2007 09:39:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2007 09:39:45 -0000 Received: (qmail 62672 invoked by uid 500); 4 Sep 2007 09:39:36 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 62639 invoked by uid 500); 4 Sep 2007 09:39:35 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 62551 invoked by uid 99); 4 Sep 2007 09:39:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 02:39:34 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of liyilei1979@gmail.com designates 209.85.128.184 as permitted sender) Received: from [209.85.128.184] (HELO fk-out-0910.google.com) (209.85.128.184) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 09:39:26 +0000 Received: by fk-out-0910.google.com with SMTP id 18so1651913fks for ; Tue, 04 Sep 2007 02:39:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rg6BtEtH+hE3U1mknknF1hK15TVsea/7FZSTOs/QsmoHNsXdi9QeriKwRLNgqgr7c2yjE42z8QR3QKnymwORCcfwDzDhoo/RAdWa1YzXJE8K+GiZoOnGzBwce+QwI2BXcPwQRIAePcibV21LcJjRrYi6wBaUKvOYy8yxgJosZac= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YgCpY/Pty/9PwyDxCWGRzSB5OvlqDmomtnGhAGzHpjfnnwAXC+4vo8DBrT9oy/jOZpMnd5B/vkj8gDGjr7hoZYGpDxv0g9sqhEHgwkLWVQPZ/AHOtLx86Tixtsy0pQlbCT9EfD1nPIh1Wj8K6B/rRcmJWsES1GTBftg6n8xpMR8= Received: by 10.82.190.2 with SMTP id n2mr13235145buf.1188898744169; Tue, 04 Sep 2007 02:39:04 -0700 (PDT) Received: by 10.82.159.3 with HTTP; Tue, 4 Sep 2007 02:39:04 -0700 (PDT) Message-ID: Date: Tue, 4 Sep 2007 17:39:04 +0800 From: "Leo Li" To: dev@harmony.apache.org Subject: Re: [classlib][sound]Proposal for Harmony Sound real implementation In-Reply-To: <5c8e69f0709040200h7638065ewcf32ba8cc5175ea@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5c8e69f0709040200h7638065ewcf32ba8cc5175ea@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On 9/4/07, Jimmy,Jing Lv wrote: > Hi, > > I miss something last time, it seems if we want Harmony to play > music, we need a native support for sound in Harmony as well. RI's > implementation has a 100k-sized dll (sound.dll) under lib directory. > However as we know, sound driver on windows and linux are totally > different, and harmony port lib do not contain any support for this. > We need to write several libs for variety of platforms (windows, > linux, macos,etc). > > And RI currently support .au、.aiff、.Wav、.Midi、.rfm files (do I > miss something here?) As a result, Harmony'd better implement these > providers (And IMO, it'll be better if Harmony support more formats of > media). > > I try to google for more open source sound > providers/native-implementation these days, though most open source > music implementations are GPL licensed, still there're a few seems > good to use. For an example, "portaudio"[1] from Carnegie Mellon > University is cross-platform APIs and library implementations for > music, under a MIT-like license, which seems compitable with APL., we > may use this library as our native lib of sound. But we'd better send > mail and ask them about this, do we? I have also some interests in this area. Apache has a mailing list about legal issues. Maybe we can ask the question there. Maybe we had better first it meet our need before we contact with the writer for the library about the license issues. Besides, I have a skim over its tutorial[2]. And it says "This means that you can write a simple 'C' program to process or generate an audio signal, and that program can run on several different types of computer just by recompiling the source code. " Does it mean that the library is just a sound driver and there still remains the work to decode signals from sound stream file, for example, a midi file, if I have not missed something? [2]http://www.portaudio.com/trac/wiki/TutorialDir/TutorialStart > If we can use "portaudio" as our native lib, the next thing is to > implement our java providers for .au、.aiff、.Wav、.Midi、.rfm, etc. > files, unluckiely, I dont find any non-GPLed or non-LGPLed open source > java sound provider yet. Is it acceptable for us to use LGPLed > providers (do not re-disturbute them, but ask harmony clients to > download themselves?) Or we can wrap native API, do some change to > comply java sound infrastructure. if native api is strong enough, the > wrapping may be not too costy. > > Currently the sound module test coverage is still low, if we > finish real implementation, we can make it 100%. > > Any comments/suggestions? And is it possible to mail portmusic and > use their lib as a part of Harmony? Thanks! > > [1] http://www.cs.cmu.edu/~music/portmusic/ > > 2007/8/28, Jimmy,Jing Lv : > > Hi All, > > > > Though sound module has 100% API coverage [1], a simple test on > > sound module shows that it lacks some real providers[2]. What's more, > > Harmony need a sound.properties file under jdk/jre/lib according to > > java doc [3]. > > It seems Harmony does not have a sound provider yet (please > > correct me if I miss something). So we have two ways to go: > > 1. code a provider for Harmony, it may be more than 300K in binary > > size according to RI's implementation, so a lot of work to do :) > > 2. find a sound provider from other open source project. I googled > > open source sound provider, and find some of them. On the top of > > search result is a project named Tritonus[4], though it does not > > update since 2003, it is said "Tritonus is an implementation of the > > Java Sound API" and has a full build for downloading, sounds perfectly > > meet our requirement (but I did not test it yet), however it is GPL > > licensed. Some other project, like JLayer/MP3SPI[5] does not support > > Midi at all which is required, and also LGPL licensed. If we want to > > use these providers, we can not re-distribute them with > > Harmony(according to GPL and APL) but ask users to download them > > theirslves. > > > > Any suggestions on this? Or do someone know some APL or > > APL-compatible open source java sound provider? Thanks! > > > > > > [1] http://www.kaffe.org/~stuart/japi/htmlout/h-jdk15-harmony5.html > > [2] a small test try to play a midi will cause an Error as follows > > while RI plays well: > > java.lang.Error: There is no MidiFileReaderProviders on your system!!! > > at javax.sound.midi.MidiSystem.getSequence(MidiSystem.java:315) > > at testdecl.PlayMidi.(PlayMidi.java:39) > > at testdecl.PlayMidi.main(PlayMidi.java:81) > > [3] file:///C:/Spec/docs/api/javax/sound/midi/MidiMessage.html > > [4] http://tritonus.org/ > > [5] http://www.javazoom.net/projects.html > > -- > > > > Best Regards! > > > > Jimmy, Jing Lv > > China Software Development Lab, IBM > > > > > -- > > Best Regards! > > Jimmy, Jing Lv > China Software Development Lab, IBM > -- Leo Li China Software Development Lab, IBM