From owner-freebsd-questions@FreeBSD.ORG Mon Sep 6 05:35:53 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C53716A4CE for ; Mon, 6 Sep 2004 05:35:53 +0000 (GMT) Received: from ms-smtp-02-eri0.southeast.rr.com (ms-smtp-02-lbl.southeast.rr.com [24.25.9.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89FA343D60 for ; Mon, 6 Sep 2004 05:35:52 +0000 (GMT) (envelope-from jason@ec.rr.com) Received: from [192.168.1.101] (cpe-065-184-172-100.ec.rr.com [65.184.172.100])i865ZjNr012412; Mon, 6 Sep 2004 01:35:45 -0400 (EDT) Message-ID: <413BF736.4010808@ec.rr.com> Date: Mon, 06 Sep 2004 01:35:50 -0400 From: jason User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040808) X-Accept-Language: en-us, en MIME-Version: 1.0 To: clayton rollins References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine cc: freebsd-questions@freebsd.org Subject: Re: Retrieving audio from memory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 05:35:53 -0000 clayton rollins wrote: > OK, funny one. > > I accidentally deleted a media file... However, I did have the file > opened in kaboodle. > > The file appears to be intact in memory; I can listen to it from > start to finish. Kaboodle, unfortunately, doesn't have any "save" > feature, so that's out. > > I'm wondering if there is some way I could hack in and read > the file out of memory. (I have root access, and am comfortable > with reading directly from memory.) > > Lacking that, is there any tool that could capture the audio > as it plays out the card? > Check your /tmp dir. It could be there, I have found media there from firefox when a website does some jave popup function that prevents me from saving a file easily by right clicking on the link. I think you could use something like # cat ./sorrydave.au > /dev/audio. This plays a file in the current dir to your aduio dev. I saw it at http://flag.blackened.net/freebsd/sound.html. Maybe you could use a pipe? http://www.foo.be/docs/tpj/issues/vol5_3/tpj0503-0002.html From this you could write a little program that calls open( a freebsd system call in libc) and write the input to a new file. The actual code samples are missing. I don't know perl, just a little c. I just tried to write a sample program but it is 1:32am here and I have no examples in front of me. I am sure this would be the most complicated(or work intensive) way of geting your song or file. If it was a mp3 I would recommend kazza or some other p2p if you can't get it yourself soon.