VOGONS


how to capture sound?

Topic actions

First post, by darksfereX

User metadata

first of all thank you for that beautiful program!!
and second, sorry if my question has already been
answered somewhere, my search for the word
"capture" didn't bring up something helpful.

i would like to capture the sound of dosbox, is
that possible somehow? i'm working under linux,
maybe there's an easy way of doing it?

thanks in advance,
darksfere

Reply 1 of 13, by Snover

User metadata
Rank l33t++
Rank
l33t++

Lineout > Linein. Problem solved.

Yes, it’s my fault.

Reply 2 of 13, by Freddo

User metadata
Rank Oldbie
Rank
Oldbie

CTRL + F6 is kinda easier 😉

Press CTRL + F6 to start/stop the recording of the sound output to a wave file.

Reply 3 of 13, by vhato

User metadata
Rank Newbie
Rank
Newbie

I tried this with Space Quest 3 and found NO files at all with .61 or .62. I even tried Ctrl-F5 to get a screen capture and nothing there to. Is there something I am missingabout audio or video capturing?

Reply 4 of 13, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You probably do not have capturing directory. See DOSBOX.CONF. I believe that by default goes everything to directory "capture" in 0.62. The directory must exist.

Mirek

Reply 5 of 13, by Guest

User metadata

Thanx for the reply.

I discovered my problem last night. WinDVD's System Tray applet took control of the CTRL+Fn keys. Once I removed it from the System Tray all was well.

Reply 6 of 13, by Phrank

User metadata

Hi guys,
does it exist a Dosbox command to start capturing a wav file without using the special key Ctrl-F6? Or it is the only way to start/stop grabbing?
I want to automate capturing multiple audio files: I thought to use old keystroke emulation programs (like 'stuffit') but in Dosbox they work only for the simple characters (Ctrl-f6 doesn't work - interrupt problem or similar?).
Can you help me?
Thanks, ciao

Reply 7 of 13, by sjsj

User metadata
Rank Newbie
Rank
Newbie
Phrank wrote:
Hi guys, does it exist a Dosbox command to start capturing a wav file without using the special key Ctrl-F6? Or it is the only w […]
Show full quote

Hi guys,
does it exist a Dosbox command to start capturing a wav file without using the special key Ctrl-F6? Or it is the only way to start/stop grabbing?
I want to automate capturing multiple audio files: I thought to use old keystroke emulation programs (like 'stuffit') but in Dosbox they work only for the simple characters (Ctrl-f6 doesn't work - interrupt problem or similar?).
Can you help me?
Thanks, ciao

Hi Everyone,

I'm attempting to do the same. That is automate via a batch file the running of a DOS program in DOSBOX that captures the sound as WAV, then run lame over it. This is to loop for over 50 files, each running like 20 mins each.

At the moment it is necesary to press CTRL-F6 to capture the sound over each of the loops. This is PAINFUL+++. Key emulators do not work either.

Can anyone suggest a way of having sound capture start as soon as DOSBOX starts, without the need to press CTRL-F6?

Cheers,
sj

Reply 9 of 13, by sjsj

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

change the code of dosbox.

Thank you Qbix for your reply.

I'd like to, though I do not have a compiler on my WinXP machine. DOS key stuffers do not work, neither does WSH using WSH.sendkey, neither does keysim. It seems DOSBOX is immune to having a software generated CTRL-F6.

Does this mean I need a Linux installation to have automated sound capture (via modification of DOSBOX code) to do my looped software function?

I've noted that this question has been asked about 3 times earlier, so perhaps an enhancement to DOSBOX to allow commandline capture, eg: DOSBOX -soundcapture ?

sjsj

Reply 10 of 13, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

a compiler can be downloaded. DOSBox compiles fine with several free compilers (gcc and visual studio express)

a WSH key might work. DOSBox get's it's keyinput from SDL. Maybe you can find something from them on how make it work with WSH

Personally I don't feel a thing for a commandline parameter for that.

Water flows down the stream
How to ask questions the smart way!

Reply 11 of 13, by sjsj

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

a WSH key might work. DOSBox get's it's keyinput from SDL. Maybe you can find something from them on how make it work with WSH

Below is a VBS code snippet to attempt to turn on sound capture. Doesn't work, so I assume that the keystroke work outside of the usual conventions (or as Qbix highlights, using SDL).

-----------------------------------------------------------------------------
'keys.vbs: Demonstrate Wsh.Sendkeys works OK with notepad, but
'fails with DOSBOX
'
'USAGE: Run CMD then type keys.vbs

set WshShell = CreateObject("WScript.Shell")

' Run DOSBOX and Notepad, focus is initially on Notepad
WshShell.Run "c:\progra~1\dosbox-0.65\dosbox -noautoexec"
WScript.Sleep 2000

WshShell.Run "notepad"
'Give Notepad time to load
WScript.Sleep 2000

'type in Hello World into Notepad
WshShell.SendKeys "Hello World - Notepad #1"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 2000

'Bring DOSBOX to the focus
WshShell.AppActivate "DOSBox 0.65"
WScript.Sleep 2000

'Send some keys to DOSBOX
WshShell.Sendkeys "Hello World - DOSBOX"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 2000

'Activate notepad again and send keys there
WshShell.AppActivate "Untitled - Notepad"
WshShell.Sendkeys "Hello World - Notepad #2"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 2000

'Send an CTRL-F6 to start sound capture - doesn't work!
WshShell.AppActivate "DOSBox 0.65"
WScript.Sleep 2000
WshShell.Sendkeys "^{F6}"

--------------------------------------------------------------------------
Any ideas on how to simulate a CTRL-F6 keystroke?

Reply 12 of 13, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

you might want to play with the output setting.
It seems that sdl has diffirent keyboard control depending on the output. You might want to try
a cvs build of dosbox as well as that one forces sdl to use a different keyboard method as well.

Water flows down the stream
How to ask questions the smart way!

Reply 13 of 13, by sjsj

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

you might want to play with the output setting.
It seems that sdl has diffirent keyboard control depending on the output. You might want to try a cvs build of dosbox as well as that one forces sdl to use a different keyboard method as well.

Ok.. found out the problem. SDL uses Directinput to obtain keystrokes. Sendkeys is ignored. So all the DOS based key emulators, as well as WSH.Sendkeys will fail.

So then to send a CTRL-F6, the SendInput method will be required. AutoHotKey, an open source keystroke emulator available at http://www.autohotkey.com does use SendInput!

I installed AutoHotKey it and created the following script, which I run at CMD as 'capture-sound.ahk' and it executes. If anyone else uses it just change the lines with the name of the title screen the script looks for. In my case it is "DOSBox 0.65`, Cpu Cycles: 8000`, Frameskip 10`, Program: FUTRMIND":

----- capture-sound.ahk -----------------------------------------------------
Run, C:\Program Files\DOSBox-0.65\dosbox.exe
WinWait, DOSBox 0.65`, Cpu Cycles: 8000`, Frameskip 10`, Program: FUTRMIND,
IfWinNotActive, DOSBox 0.65`, Cpu Cycles: 8000`, Frameskip 10`, Program: FUTRMIND, , WinActivate, DOSBox 0.65`, Cpu Cycles: 8000`, Frameskip 10`, Program: FUTRMIND,
WinWaitActive, DOSBox 0.65`, Cpu Cycles: 8000`, Frameskip 10`, Program: FUTRMIND,
Send, {CTRLDOWN}{F6}{CTRLUP}
WinWaitClose
----------------------------------------------------------------------------------
Thank you for all your assistance. I hope this helps others who may wish to send keystrokes to DOSBOX.

Cheers,
sjsj