LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-09-2005, 09:32 AM   #1
meercat
LQ Newbie
 
Registered: Nov 2004
Location: Bristol
Posts: 3

Rep: Reputation: 0
java getting audio stream from an application


I am trying to write a program in Java that will take the audio data being given to the sound card and trying to record it.

I have found huge amounts of examples on how to take in audio from a microphone and save it as a file, but what I want to do is record any sound that an application may be making, such as xmms or any other audio player.

The examples that I have to record data from a microphone get a TargetDataLine(). Am I correct in assuming that this not what I want, as this will be the audio that has come into the sound card via the line-in and is now being output?

I think I am on the right track in saying that what I want is a SourceDataLine() - that being the audio that is being given to the sound card.

If I am on the right track, how then will it work, as a SourceDataLine() can only be opened once, so if an application has opened it to send its audio data to the sound card my program will then give an error as it is already open.

Do I need to somehow hijack the SourceDataLine() that is being used, and redirect it to my program. How would I go about doing this?

I have looked at :

jsresources.org
java.sun.com/j2se/1.5.0/docs/guide/sound/programmer_guide/contents.html

but they do not seem to be able to answer my questions!!

Thank you for your time

Meercat
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application/Octet-Stream Dooley MEPIS 9 05-01-2008 04:27 AM
CUPS and #application/octet-stream mr.wobble Linux - Software 1 05-11-2006 07:17 AM
Help with <application/octet-stream> Dooley MEPIS 1 10-08-2005 02:08 PM
application/octet-stream aaru_ali Mandriva 2 02-01-2005 02:47 PM
Application / octet stream Daredevil Programming 0 04-02-2004 09:50 AM


All times are GMT -5. The time now is 04:42 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration