waveIn version 3.1 (Jun 19 2003)
Copyright (C) 2000, 2003, Hiroshi OHNO. All rights reserved.

GUI front end program - waveInG.exe included.

+---------------------------------------------------+
| Please see waveIn-j.txt for Japanese instruction. |
+---------------------------------------------------+

**********************************
1. Summary
**********************************
This is a program that aquires PCM sound data from sound device
and encodes (compresses) that data in real time.
You can records MP3 or WMA format in real time with this program.
This program does not create any intermediate file while recording,
so it is suitable even for a computer with small disk capacity.
One of most important features of this program is detecting
a silent section of input and dividing output files automatically.
This program can also output WAV format (non compression).
This program is a command line program executed on a console,
and also used from GUI front end (waveInG.exe).

[Required compression engine]
  - MP3 encoder: "Go-go no coder" (DLL version)
  - MP3 encoder: "LAME" (DLL version)
  - Windows Media ncoder (Windows Media Player 9 Serires)
One or more these compression engines must be installed
separatelly from the installation of this program.

[Operating Environment]
  - Windows 2000 (Maybe compatible with Windows XP, although not confirmed)
  - Maybe compatible with Windows 95/98/Me/NT4.0, but I cannot support these.


**********************************
2. User Lisence Agreement
**********************************
To use this program, you should agree all the clauses below.
If you don't agree any of these clauses,
you are NOT allowed to use this program.

(1) The author does NOT gurantee any operations, specifications,
    performance, and/or any results of this program.
(2) You MUST BE RESPONPONSIBLE for the use of files generated
    by this program in any situations.
(3) This program is licensed free of charge.
    You can use for personal and  business purpose.
(4) You can freely redistribute this program as the same package
    as originally distributed. If you redistributed this program
    within other packages and/or modify and rebuild the original
    source code, you must use ANOTHER NAME except 'waveIn' to 
    distinguish from the original package.


**********************************
3. Installation of encoder(s)
**********************************
You must install the encoder(s) as follows.
You must at least one encoder that you will actually use.

(1) MP3 encoder "GoGo no coder" (DLL version)
  GoGo is a ultra fast MP3 encoder derivled from LAME encoder.
  Unfortunately, I cannot find any English site for download.
  Please try to search and find 'GOGO.DLL'.
  Place this DLL at the directory where waveIn.exe exists.
  I confirmed with ver.3.11a DLL and ver.2,39c DLL.
  Remarks: The rate converter is not implemented with ver 3.xx,
           -sr option will be ignored with these versions.

(2) MP3 encoder "LAME" (DLL version)
  Copy lame_enc.dll, which is a DLL version of LAME,
  to the directory where waveIn.exe exists.
  You may go http://www.mp3dev.org/ and follow "MP3 Related Links" ->
  "Binaries/DLL's of the LAME command line encoder:" and
  visit the listed sites for Windows.
  I confirmed with version3.93.1/DLL ver.1.32(2002/12/3).

(3) Windows Media Audio encoder
  Install Windows Media Player 9 Series.
  You can get this from Microsoft's home page.

[Remarks] I will NOT reply about how to get these binaries.


******************************************
4. How to use GUI version / waveInG.exe
******************************************
Please use this program to record with the simplest way.

[Installation]
There is no installer.
Extract all files from the archive and place these at any directory you like.

[Usage]
Double click 'waveInG.exe' icon.
Set appropriate parameters on the dialogue.
To the file path box, please enter the output filename without an extension.

e.g.1: If you specify 'c:\output' without the silent detection feature,
       Output will be c:\output.mp3, c:\output.wma, or c:\output.wav.

e.g.2: If you specify 'c:\output' with the silent detection feature,
       Output will be c:\output_01.mp3, c:\output_02.mp3, ... et al.

e.g.3: If you specify 'c:\output_01' (<any string>_<2 digits number>)
       without the silent detection feature,
       Output will be c:\output_01.mp3 first, then after finisihg recording,
       the output path will be updated to c:\output_02 automatically.

This program does NOT have functions selecting the recording source
or adjusting the recording level. Use volume control panel of Windows
accessories for those purposes.
Normally, 'Options:' field may be void.
You can start recording by pushing 'REC START'.

[Uninstallation]
This program does NOT use registry.
Simply delete distributed files and waveInG.dat.

[Remarks]
Those features, which can be specified by console version (waveIn.exe) only,
must be specified in 'Options:' field directly if required.
  - Buffer capacity (Default value will be used)
  - Specification of input sound device (WAVE_MAPPER will be used)
  - Left channel or right channel only recording
  - Upper limit rate specification for MP3 VBR encoding
  - MP3 psychological analysis (always enabled)
  - MP3 16kHz LPF (always enabled)


******************************************
5. How to use console version / waveIn.exe
******************************************
Please use this program to specify each parametes / for batch execution.

[Installation]
There is no installer.
Extract waveIn.exe from the archive and place these at any directory you like.

[Usage]
Use this program on command prompt (MS-DOS prompt).
This program does NOT have functions selecting the recording source
or adjusting the recording level. Use volume control panel of Windows
accessories for those purposes.
I recommend to make batch file with predefined parameters
and execute this batch file repeatedly.
Batch file can be registered as Windows task to start according to the specified schedule.

[Synopsis]
waveIn -b NNN [other options...] <filename>

[Arguments]
Same options or contradictive parameters are specified,
the last parameter is used.
Argumets are case-insensitive.

<filename>: Output file name except file extension.
            If the path includes space character(s), quote the path with "".
            When using silent detection feature, the output file name will be
            specified name followed by "_01", "_02"...
            If the specified file is already exists, it may be overwritten.
            (This spec is dependent to encoder.)

-b NNN: Output bit rate (kbps)
	e.g.  -b 128 (Output with 128kbps data)

-t NNN: Recording time (sec)
        If 0 or not specified, continue recording until manually interrupted.
	e.g.  -t 3600 (Recording 1 hour)

Encoding format
No specification: Use GoGo no Coder to generate MP3 format.
-LAME: Use LAME encoder to generate MP3 format.
-WMA: Generate WMA format.
-WAV: Generate WAV format.

-ms N:  Silent detection feature enabled
        N is the threshold duration (sec) judged as the silent continuation,
        such as the interval of music program.
        When silence is detedted, the output file will be changed.
        You may specify fractional numbers, but the specified parameters
        will be rounded with 0.2 sec unit.
	e.g.  -ms 2  (If silence is continued more than 2 seconds,
	              output file will be changed.)

-sl NN: Silent level (NN/1000)
        Average input level is less than this specified value,
        it will be judged as silence.
        If not specified, 10 (10/1000) will be used.

-f N: Input PCM format
      Available format and parameters are as follows.
      If the input device does not support the specified format,
      this program will terminates.
        -f 1:    11.025 kHz, Mono, 8-bit.
        -f 2:    11.025 kHz, Stereo, 8-bit.
        -f 3:    11.025 kHz, Mono, 16-bit.
        -f 4:    11.025 kHz, Stereo, 16-bit.
        -f 5:    22.05 kHz, Mono, 8-bit.
        -f 6:    22.05 kHz, Stereo, 8-bit.
        -f 7:    22.05 kHz, Mono, 16-bit.
        -f 8:    22.05 kHz, Stereo, 16-bit.
        -f 9:    44.1 kHz, Mono, 8-bit.
        -f 10:   44.1 kHz, Stereo, 8-bit.
        -f 11:   44.1 kHz, Mono, 16-bit.
        -f 12:   44.1 kHz, Stereo, 16-bit. (default)
        -f 13:   48.0 kHz, Mono, 8-bit.
        -f 14:   48.0 kHz, Stereo, 8-bit.
        -f 15:   48.0 kHz, Mono, 16-bit.
        -f 16:   48.0 kHz, Stereo, 16-bit.

-sr NN: Output sampling rate (kHz)
         Ignored for WAV format output.
         If not specified, the same rate as -f option will be used.
	e.g.  -sr 44.1 (Output as 44.1kHz sampling data)

-bs1: Input level boost (1bit)
-bs2: Input level boost (2bit)
         Amplify input signal 2 times(6dB up) or 4 times (12dB up).
         Use this option when input level is very low.
         These parameters cannot be used with 8-bit mode.

-left:  Left channel (or main channel) only recording
-right: Right channel (or sub channel) only recording
         These options can be used with 16-bit, stereo mode only.

-dev N: Input sound device
        If not specified, the default device (WAVE_MAPPER) will be used.

<<for GoGo no Coder & LAME only>>

-v N: VBR (Variable Bit Rate) compression
      N can be 0 (the highest quality) to 9 (the highest compression ratio).
      If this parameter is specified, the number specified with -b option
      means the low limit of output bitrate (kbps).

<<for GoGo no Coder only>>
Please refer to the GoGo insturction for the meaning of each option 

-bu NNN: The high limit of output bitrate (kbps)

-nopsy: Disable psycho-acoustic analysis. If not specified, it will be enabled.

-lpf: Enable 16kHz Low-pass filter. If not specified, it will be disabled.

[Exit code]
0: Normally exited
1: Abnormally terminated

[Example]
waveIn -t 7200 -b 96 -v 6 -ms 2 -sl 20 c:\output

    This exmaple will record from default sound device, for 7200 seconds,
    44.1kHz, stereo, 16bit PCM data,
    then encoding MP3 format with VBR, low limit of 96kbps.
    When the input level is lower than 20/1000 (655/32768)
    more than 2 seconds, it is judged as silent section.
    Each section will be recorded into the files c:\output_01.mp3,
    c:\output_02.mp3, ... 


**********************************
6. Testing environment
**********************************
I have confirmed the proper operation with these environments:
(a) DIY-PC (PentiumIII 800MHz) + CMI8738-6CHPCI(S/PDIF IN)
      Windows 2000 Professional Service Pack 3
(b) Vendor's PC (Pentium4 2.0GHz) + embedded sound engine
      Windows 2000 Professional Service Pack 3


**********************************
7. Source code
**********************************
I publicize the soruce code for this program.
You can use the code for personal and business purpose,
but please refer the document in the package about the detailed conditions.
   http://www.geocities.co.jp/SiliconValley-Bay/4893/


**********************************
8. Contact
**********************************
Please feel free to send e-mail for any bug reports, questions, or comments.
   waveybb@yahoo.co.jp


**********************************
9. Comments
**********************************
- I have used this program for more than three years to record
  music program of a Japanese satellite broadcasting.
  It's a very simple program, but is operating very comformatbly
  because it does not create a large intermediate file.


**********************************
10. Acknowledgement
**********************************

- I appreicate authors of great encoders 'LAME' and 'GoGo no Coder'.

- I appreicate 'na'-san who gave me an idea of GUI front end.

- I appreciate Tanaka(Kaku)-san who publicized the sample code of WMA encoding.

- I express my gratitude to all users who gave me bug reports and/or request.


**********************************
11. History
**********************************
[version 3.1]
 - 32kHz input options is now working correctly.
 - LAME option of GUI is now working correctly.
 - Compiler is changed to Visual Studio .NET 2003
[version 3.0]
 - Added English insturction (this file).
[before version 3.0]
 - Omitted.

-----
$Id: waveIn.txt,v 2.3 2003/06/19 14:52:39 ohno Exp $
[EOF]

