Partager via


Waveform Audio Registry Settings (Compact 2013)

3/26/2014

The registry stores information necessary to configure the system for applications and hardware devices. The registry also contains information that the operating system continually references during operation.

Note

The default registry values vary depending on which Catalog items are included in your OS design. For more information, see the section "Default Registry Settings" in Windows Embedded Compact Help.

Customizing Device Sound Files

The operating system uses the registry to locate wave resources in a DLL for system sounds. These sounds can be customized by adding a new resource DLL containing customized sounds, and then adding a registry entry to use these new sounds.

You can customize sound effects with the registry key:

HKEY_LOCAL_MACHINE\Drivers\Builtin\WAPIMAN\Clicks.

The following code example shows how this registry subkey can be used to load custom sounds from a resource DLL, in this case WavClick.dll:

[HKEY_LOCAL_MACHINE\Drivers\Builtin\WAPIMAN\Clicks]
    "ClickDLL"="WavClick.dll"    <name of dll to load resources from>
    "KeyLoud"=dword:64           <resource ID of this sound>
    "KeySoft"=dword:65
    "TouchLoud"=dword:66
    "TouchSoft"=dword:67

Controlling Callback Thread Priority

This registry key controls the priority of the client application's wave callback function. This function is used to process messages sent by the WaveAPI to the application.

[HKEY_LOCAL_MACHINE\Audio\WaveAPI\Callback]"Priority256"=dword:[priority]

Where priority is defined as: A value that ranges from 0 through 255, with zero as the highest priority. This value corresponds to the second parameter in CeSetThreadPriority.

The default (if this key is not present) is 220.

Untrusted applications do not have access to CeSetThreadPriority. If the call to CeSetThreadPriority fails, the callback will default to THREAD_PRIORITY_HIGHEST.

Control Panel Settings

You can affect the volume of waveform audio output with the registry subkey:

HKEY_CURRENT_USER\ControlPanel\Volume.

The following table shows the named values for this key.

Value

Type

Description

Volume

DWORD

The default setting is 0xFFFFFFFF.

This value sets the default volume level that each waveform audio device is initialized to.

The allowable range for this value is from 0 to 0xFFFFFFFF.

PlaySound

DWORD

The default setting is 0xFFFFFFFF.

This value set the initial volume level for the function PlaySound.

The allowable range for this value is from 0 to 0xFFFFFFFF.

Mute

DWORD

The default value is 7, which means all sounds are enabled.

This value identifies which types of sounds are enabled. It is a bitwise OR of the following values.

  • 1 - Notification sounds are enabled.
  • 2 - Application sounds are enabled.
  • 4 - Event sounds are enabled.

Screen

DWORD

The default setting is 2.

This value sets the volume level for screen taps. It can be set to one of the following values.

  • 0 - Muted
  • 1 - Soft
  • 2 - Loud

Key

DWORD

The default setting is 2.

This value sets the volume of taps on the soft keyboard. It can be set to one of the following values.

  • 0 - Muted
  • 1 - Soft
  • 2 - Loud

Disabling audio recording

This functionality allows you to optionally turn off the recording capabilities of your device. This functionality is provided by the registry key: HKEY_LOCAL_MACHINE \System\AudioRecording.

The following table shows the named values for this key.

Value

Type

Description

Enabled

DWORD

The absence of this key indicates that audio recording is ENABLED.

The presence of this key with a value of anything other than 0 indicates that audio recording is ENABLED.

The presence of this key with a value of 0 indicates that audio recording is DISABLED.

This registry setting changes the behavior of the following applications:

  • The Audio Toolbar
    Disabling audio recording will remove the recording button from the Audio Toolbar.
  • Notes
    Disabling audio recording will cause the "View Recording Toolbar" menu item to disappear.
  • Messaging
    Disabling audio recording will cause the "Insert Voice Note" menu item to disappear.
  • Button settings
    The option to assign the Record program to a button is removed. If a button is already assigned to Record when the registry key is set, the button assignment is changed to <None>.

PlaySound

This registry key controls how the PlaySound function plays audio.

[HKEY_LOCAL_MACHINE\Audio\PlaySound]
    "Buffers"=dword:4
    "msPerBuffer"=dword:14

The following table shows the named values for this key.

Value

Type

Description

Buffers

DWORD

Value specifies the number of buffers that PlaySound uses. The default is 4. The minimum setting is 2 buffers, and the maximum setting is 1000 buffers.

msPerBuffer

DWORD

Value specifies the number of milliseconds of audio data per PlaySound buffer. The default is 0x14, which is equivalent to a decimal value of 20. The minimum setting is 1 millisecond per buffer, and the maximum setting is 1000 milliseconds per buffer.

See Also

Reference

Waveform Audio Reference