Is it Possible??? AudioInputStream to DataSource

Can anyone help me to convert one of these
javax.sound.sampled.AudioInputStream
java.io.InputStream
javax.sound.sampled.DataLine
javax.sound.sampled.SourceDataLine
to one of these
javax.media.protocol.DataSource
javax.media.bean.playerbean.MediaPlayer
javax.media.Manager
javax.media.Player
or any other Player in any other package that has a good set of controls like stop, play, seek and volume for MPEG3 audio
The obvious answer is write the stream to a file first and then use a MediaLocator. I don't want to write the stream to a file.
I can't work it out and after weeks of searching on the Internet I can't find a way of doing it. Why aren't there any packages, players or beans that play a stream?
Please help!

Thank you both for your advice.
MediaLocator is not an API. It is a class of Java Media Framework package javax.media
which allows you to play a wide variety of media with a good set of controls. It's very good but doesn't take an InputStream as an input. It takes URLs, Files, and DataSources.
I can't play from a File or URL because the source File is encrypted. I decrypt it to a java.io.InputStream and play it on the fly. The decrypted data goes to a 30Mbyte java.nio.ByteBuffer first. Then I create an InputStream from the ByteBuffer and then an AudioInutStream which I can play
At the moment I am using these classes to play the audio
javax.sound.sampled.AudioFormat;
javax.sound.sampled.AudioInputStream;
javax.sound.sampled.AudioSystem;
javax.sound.sampled.DataLine;
javax.sound.sampled.SourceDataLine;
as well as the Tritonus API to handle MP3 decoding
However JMF will decode MP3 if Suns mp3plugin is installed
I have problems with seeking. I get Buffer Overflow errors with large files and slow computers if I skip too far ahead. It doesn't work very well and JMF is easier. I made an application with it before. Just the conversion of java.io.InputStream to a valid JMF input is the problem. It's unfortunate that it doesn't have this facility built in.
So far I only found these that are claimed to work
http://www.tek-tips.com/viewthread.cfm?qid=288487
and
http://www.extollit.com/isdsjmf.php
I tried the first one and got this error
Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@ba6c83
Error: Unable to realize com.sun.media.PlaybackEngine@ba6c83
javax.media.CannotRealizeException
at javax.media.Manager.blockingCall(Manager.java:2005)
at javax.media.Manager.createRealizedPlayer(Manager.java:580
I couldn't work it out beyond that so I came here.

Similar Messages

  • Is it possible to grant datasource resume actions to the Operator role?

    Hi gurus,
    I'm trying to grant the JDBC datasource suspend/resume action to the 'Operator' role. I understand this is an admin task and the 'Operator' role cannot do this. I've tried to edit weblogic.management.runtime -> JDBCDataSourceRuntime -> suspend/resume policy Mbean via the JMX editor and added the Opertor role in a new policy, but I haven't been successful.
    Is it possible to provide a user with a script (which can run as an Admin user), without providing the admin credentials to an operator user, so that he can resume a suspended data source?
    Thanks.

    Hello,
    theoretically you could remove the domain admins from the local administrator group. BUT this you should first test in a lab to see what happens after removal on the SCOM server.
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • Parallel datapackage processing possible for file datasource in NW2004s

    Hi,
    We have a huge flatfile which is quite slow in loading due to the fact that it processes all datapackages serially (25.000 records each). Is it possible at all to do this in parallel like it is possible for R/3 datasources via the control parameters option (table roidocprms- ? According to the help, the customizing RSCUSTV6 is the one to be used for flatfiles but this doens't include the number of parallel processes.
    If not, would it be better for the performance to use bigger package seizes for flatfiles ?
    thanks

    Just to clarify :
    In this case we load via the old methods (infosources/update rules) so no usage of transformations and DTP's.

  • JavaFX Composer and jdbc datasource

    I'm trying to build a javafx application that is basically a CRUD interface for a Microsoft SQLServer DB. I can drag and drop the jdbc datasource into my scene, and I can execute the select query against the table. I have copied over the jar file containing the sqlserver driver (using the Project->Properties dialog). When I try to run the project, I get an error message that no suitable driver is found for the connection string that is being used.
    The connection string for the sqlserver driver is: jdbc:sqlserver://DEVSQL-SERVER:1433;databaseName=User;
    Does anyone know if it's not currently possible to use datasources other than the built-in derby db?
    Seems like you should be able to use any datasource if you have the required jar file for the drivers.
    TIA,
    Kevin

    Hi,
    The JDBCDataSource is using JDBC API but it does not register/initialize any particular driver.
    Therefore you should have the following line of code added at the beginning (right after the package statements) of the Main_run.fx file:
    Class.forName ("jdbc.Driver");
    where jdbc.Driver is a fully-qualified class name of your JDBC driver.
    Regards,
    David

  • Set datasource location command at runtime

    Post Author: Jamal
    CA Forum: Semantic Layer and Data Connectivity
    Dear Folks,
    I have crystal report 10 and MS access, I need to change my datasource location at runtime without having to type code other than crystal report like VB or C++, Do crystal report have this possibility to change datasource location at runtime without needing to code other than crystal report ???
    Basicly I have multiple MS access database files and need one Crystal report to read from all of them at the same time, how can I do that without coding in a language other than crystal report.
    Best Regards
    Jamal

    Post Author: matthewh
    CA Forum: Semantic Layer and Data Connectivity
    Get a copy of BO Server and use a Business View.   Don't know of any way in Crystal Reports  itself.  BO Server is good but it ain't cheap.  Depends on how many users you have and what sort of budget you have.  I'm using it here and it has a lot of benefits. Alternatively build a data warehouse just for reporting using a proper DB engine and get a single report off that.  Use something like MySQL - fast, and above all - free!   If you don't need bang-up-to-the-second reports then run a scheduled data extraction and upload over night, load the data into the new warehouse and then run your reports against it.  I'm in the process of doing just that.  Read Ralph Kimball's books "The Data Warehouse Toolkit" and "The Data Warehouse ETL Toolkit" to get the idea.  The MySQL forum has a good Data Warehouse section.  A warehouse also gives you many advantages in that your production databases are not too heavily loaded, all your data conforms to set standards (eg data formats are all the same) and you have a historical record that can build over the years to many GB of data - I think Access will struggle with that ;0) - to name but a few.  Hope this helps.  BTW - thought of this last night - MySQL also has the Federated engine - so you could hook all your databases into it and query it with Crystal as though they were a single database.  Not sure if it'll connect to Access though.

  • Script for checking datasource connections

    Hi,
    I would like to find out if it's possible to monitor datasource connections using Unix based scripts and if so how can this be accomplished?
    Thank you in advance
    Twaggz

    Hi
    Thanks for the link however I was looking at enabling monitoring at an AIX level.

  • RDBMS event generator & JNDI datasources

    Hi everyone,
    My WLI 8.1 SP5 is going nuts ! I'm under a cluster architecture, WL 8.1 SP6 with Red Hat Linux, JRockit 1.4.2_10. Deploying an application i need to create some RDBMS event generator, but when i do this, i get an NameNotFoundException looking for my jndi datasource ( see below ). The datasource is created and i can work with it, since it's a must for my application. How is it possible that a datasource exists for a web application and does not for an integration event ? Does anyone have any experience about this ? Any help will be very appreciated !!
    <18-may-2007 23H47' CEST> <Error> <WLW> <000000> <Error occurred while retrieving the Database Type
    javax.naming.NameNotFoundException: Unable to resolve 'DSDataSource' Resolved ; remaining name 'DSDataSource'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:924)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:230)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:154)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:258)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:363)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at com.bea.wli.event.util.EventUtils.getDataSourceConnection(EventUtils.java:640)
    at com.bea.wli.oam.rdbmseg.RDBMSChannelValidator.setChannelValues(RDBMSChannelValidator.java:471)
    at com.bea.wli.oam.rdbmseg.RDBMSChannelValidator.validate(RDBMSChannelValidator.java:218)
    at com.bea.wli.oam.rdbmseg.RDBMSMainServlet.submitChannel(RDBMSMainServlet.java:327)
    at com.bea.wli.oam.eg.framework.XEGMainServlet.processRequest(XEGMainServlet.java:88)
    at com.bea.wli.oam.eg.framework.XEGMainServlet.doPost(XEGMainServlet.java:151)
    at com.bea.wli.oam.core.BaseServlet.userService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Unknown Source)
    at com.bea.wli.oam.core.BaseServlet.run()Ljava.lang.Object;(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at com.bea.wli.security.authentication.AuthenticationService.runAs(AuthenticationService.java:109)
    at com.bea.wli.oam.core.BaseServlet.secureService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Unknown Source)
    at com.bea.wli.oam.core.BaseServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    If you are using a cluster you need to make sure the connection pool and data source are deployed on the admin server. I have had this problem many times before.

  • Set Datasource Location - Crystal XI to Access 2007 DB

    Hi all,
    Is it possible to Set Datasource location for a Crystal XI report to an Access 2007 DB?  I have reviewed the postings and can not find an answer.
    Edited by: Karen Arena on Jun 23, 2009 3:24 PM - I have resolved this on my own, it is possible, see library documentation.

    Resolved through documentation in Library.

  • Migrating myself system datasource

    Hi,
      Is it true that we cannot migrate datasources of myself BW system (generated, export datasources) to RSDS type?
    I know that new RSDS format is not possible for external datasources like Informatica and DB Connect but is it also true for BW myself datasources?
    I am getting this error "Export datasource 80PROFIT_CTR(DBWCLNT001) in myself system: Object type RSDS not possible".
    I tried both with export and w/o export.
    Please help
    Thanks

    Example -
    Updating data from ODS to Cube
    Right click on Data store object-> create transformation ->give the target cube name->give the load option either full or delta-> activate the transformation and load data from ods to cube by clicking execute in third tab
    DTP required between DSO and Infocube to handle DELTAS.
    Using Process Chains -
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/dc87c1d711f846b34e0e42ede5ebb7/content.htm
    Hope it Helps
    Chetan
    @CP..

  • Migrating myself datasource

    Hi,
      Is it true that we cannot migrate datasources of myself BW system (generated, export datasources) to RSDS type?
    I know that new RSDS format is not possible for external datasources like Informatica and DB Connect but is it also true for BW myself datasources?
    I am getting this error "Export datasource 80PROFIT_CTR(DBWCLNT001) in myself system: Object type RSDS not possible".
    I tried both with export and w/o export.
    Please help
    Thanks

    Hi,
    I dont think so. You may get this error because first you need to convert the base object's dataflow to 7.0 dataflow. In your case convert the 0PROFIT_CTR's dataflow to 7.0 dataflow and then try the 80PROFIT_CTR.
    Bye
    Dinesh

  • Can't remove datasource

    Hi,
    I am trying to remove a datasource and it saids "No connection to system Z100 possible" and the datasource would be still there. How can I remove this?
    Thanks,
    Will

    Hi,
    Before you delete the datasource, can you confirm that the connection between your BW system and your source system (Z100) is up?  You can use transaction SM59 for this.
    Andy

  • How to create datasource/connection pool programatically?

    Hello,
    We are developing a system that connects to multiple databases by dynamically switching datasources, using ADF 12.1.3. Application is deployed on weblogic and glassfish.
    There is no problem on switching and working on multiple datasources which is created previously on the application server (weblogic/glassfish).
    Now we need to create a datasource while system is running.
    Is it possible to create datasource programatically, and list datasource previously created?
    Jdeveloper/ADF: 12.1.3.
    Thanks,
    Ganbat Bayarbaatar.

    Dear Ashish,
    Thank you for your response, but that is not what I was looking for.
    I haven't any problem on changing datasources. I would like to create new datasource on application server.
    On Andrejus's post, there is a comment about what I'm asking:
    Syed : Nice Post. To enhace this more further. How can we get list of JDBC Data sources available in weblogic in the ADF Application.
    Andrejus: By using WebLogic API this should be possible or by accessing MBean...
    Is there any more-detailed blog post or doc, about "Weblogic API", "MBean"  and using them to create datasource?
    Thanks,
    Ganbat.

  • Retrieve db connection using datasource object

    The problem is: i can't retrieve the connection to database
    using datasource object in jsp.
    my jsp was build by Oracle9i Report Builder,then deployed
    to OC4J jsp container,
    i define the datasource at container level,
    but an error "log on not specified" arise.
    is it possible to use datasource object in such a way or not?
    thanks you for your help.

    What is the full Java and os versions you are using to compile and to run. Note that with JDEV the platform used for your code may be different than the platform used by JDEV itself.
    Please modify all of your exception handlers to print the stack trace. Add this as the first line in each handler.
    ex.printStackTrace();The stacktrace contains important information about where the problem really occured.
    See the Java docs for NamingException - http://docs.oracle.com/javase/6/docs/api/javax/naming/NamingException.html
    >
    This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces. The nature of the failure is described by the name of the subclass. This exception captures the information pinpointing where the operation failed, such as where resolution last proceeded to.
    •Resolved Name. Portion of name that has been resolved.
    •Resolved Object. Object to which resolution of name proceeded.
    •Remaining Name. Portion of name that has not been resolved.
    •Explanation. Detail explaining why name resolution failed.
    •Root Exception. The exception that caused this naming exception to be thrown.

  • Declarative Transactions, Session Beans & JDBC

    Hi (this is really a newbie question),
    If I executed an SQL Update statement in a Stateless Session Bean via JDBC,
    is my call to the database enlisted in the container transaction
    automatically? (Of course, I am assuming the correct TxRequired settings
    are set on the deployment descriptors for the Session Bean.)
    Asked in another way, how does JDBC "talk" to the EJB container to let it
    know that it is being called within a Transactional Context and that all
    activities with the database should then be enlisted in a transaction
    automatically? Where does this "smartness" come in? Or does this not happen
    at all - do I have to "obtain" the JDBC connection object from the EJB
    container instead of writing directly to JDBC?
    Thanks in advance,
    Abdullah Kauchali

    Correct.
    I'd also recommend (where possible), doing the DataSource JNDI lookup in
    your setSessionContext method and storing it away in a member variable.
    There's usually no reason to do it on every method call.
    -- Rob
    Abdullah Kauchali wrote:
    Okay,
    After some investigations, this is what I've learned:
    1. To get automatic transactional enlistment (in a distributed tx), you
    have to make your EJB container aware of the JDBC datasource (viz. you have
    to create a Transactional DataSource). This is done by creating necessary
    entries in a configuration XML file so that the container can connect to the
    JDBC datasource when fired-up;
    2. You then only create your Connection object via a reference (JNDI to be
    exact) to the connection object and NOT directly with JDBC (this was my
    confusion in fact). Something like this:
    //obtain the conduit to the JNDI resource manager factory
    javax.sql.DataSource objDS = (javax.sql.DataSource)
    context.lookup("~some jndi
    reference~");
    //now get the connection object - notice no "javax" but "java"
    java.sql.Connection objCon = objDS.getConnection();
    3. By doing 2. above you are actually using a "Resource Manager Connection
    Factory" to get your Connection object for subsequent SQL Updates;
    4. As long as your JDBC driver supports the javax.sql.DataSource interface
    and provided Transactional Context is propagated from any root call to your
    worker Session Bean, you get automatic transaction enlistment of the SQL
    Updates with your EJB container;
    Please correct me if I have concluded wrongly,
    Regards
    Abdullah
    "Abdullah Kauchali" <ak@ak> wrote in message
    news:[email protected]...
    Hi (this is really a newbie question),
    If I executed an SQL Update statement in a Stateless Session Bean viaJDBC,
    is my call to the database enlisted in the container transaction
    automatically? (Of course, I am assuming the correct TxRequired settings
    are set on the deployment descriptors for the Session Bean.)
    Asked in another way, how does JDBC "talk" to the EJB container to let it
    know that it is being called within a Transactional Context and that all
    activities with the database should then be enlisted in a transaction
    automatically? Where does this "smartness" come in? Or does this nothappen
    at all - do I have to "obtain" the JDBC connection object from the EJB
    container instead of writing directly to JDBC?
    Thanks in advance,
    Abdullah Kauchali

  • Regarding Additive Field In DSO

    Hi Guys,
    I have one field as summation in DSO. I made it additive while creating  the transformation. Can any one tell me how it will add a summation when i do a delta update.
    Thanks

    Hi,
    Transformation
    Aggregation type:
    Use
    You use the aggregation type to control how a key figure or data field is updated to the InfoProvider.
    Features
    For InfoCubes:
    Depending on the aggregation type you specified in key figure maintenance for this key figure, you have the options Summation, or Maximum or Minimum. If you choose one of these options, new values are updated to the InfoCube.
    The aggregation type (summation, minimum & maximum) specifies how key figures are updated if the primary keys are the same. For new values, either the total, the minimum, or the maximum for these values is formed.
    For InfoObjects:
    Only the Overwrite option is available. With this option, new values are updated to the InfoObject.
    For DataStore Objects:
    Depending on the type of data and the DataSource, you have the options Summation, Minimum, Maximum or Overwrite. When you choose one of these options, new values are updated to the DataStore object.
    For numerical data fields, the system uses characteristic 0RECORDMODE to propose an update type. If only the after-image is delivered, the system proposes Overwrite. However, it may be useful to change this: For example, the counter data field u201C# Changesu201D is filled with a constant 1, but still has to be updated (using addition), even though an after-image only is delivered.
    The characteristic 0RECORDMODE is used to pass DataSource indicators (from SAP systems) to the update.
    If you are not loading delta requests to the DataStore object, or are only loading from file DataSources, you do not need the characteristic 0RECORDMODE.
    Summation:
    Summation is possible if the DataSource is enabled for an additive delta. Summation is not supported for data types CHAR, DAT, TIMS, CUKY or UNIT.
    Overwrite:
    Overwrite is possible if the DataSource is delta enabled.
    When the system updates data, it does so in the chronological order of the data packages and requests. It is your responsibility to ensure the logical order of the update. This means, for example, that orders must be requested before deliveries, otherwise incorrect results may be produced when you overwrite the data. When you update, requests have to be serialized.
    Regards
    Santosh

Maybe you are looking for