Playing wav files

  • Hi,
    I am trying to play .wav files using the WinCE waveOut functions. I do this within one ("audio") thread, and within another ("serial IO") thread, my application needs to send data to com port 2 every 100ms.


    The audio files play ok, however, my serial IO send data function is not called within the required time. The serio IO thread is set to CE_THREAD_PRIO_256_HIGHEST, audio thread is CE_THREAD_PRIO_256_NORMAL.


    I thought that the threads are managed by WinCE to in effect run in parallel, i.e. run the quantum period of time then go to the next thread, espeically if the other thread is higher prio. Have I understood this correctly?
    Is it possible that the waveOut resources are interferring with the other threads or does my problem lie somewhere else?


    thanks,
    Sarah

  • Hello,
    i think your suggestions are right (and 100ms is a very long time distance). So the error may caused by an other action.
    -> Did you check what happens if you set a very hight prioritiy for the IO thread e.g. using CeSetThreadPriority(..., 100)?
    -> Did your IO thread works without audio?

    Quote

    Is it possible that the waveOut resources are interferring with the other threads or does my problem lie somewhere else?

    -> Which HW and kernel do you use? Did you check corresponding History.txt

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I've updated the kernel to V1.34 100211, without changing the thread priority, and it seems to have done the trick so far.


    How can I tell which kernel is loaded on a NetDCU10? When DCUTermi is connected and then the board started up I only receive the bootloader version etc below:
    --
    Microsoft Windows CE Ethernet Bootloader Common Library Version 1.1 Built Dec 3 2008 15:56:43
    Microsoft Windows CE Bootloader for NetDCU10 Built Feb 4 2009
    Portions copyright (c) 2007 F&S Elektronik Systeme GmbH
    Boot Loader, Version 1.31
    StepStone Loader, Version NA34


    Samsung: 512MBit (64MB)
    Create partition for boot section ... Success
    INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xb
    System ready!
    Preparing for download...
    Press >S< to step into monitor...
    AUTO BOOT enabled
    +ReadKernelRegionFromNandFlash
    Image Signature in Flash Memory found (dwSig=0x43454345)
    TOC pointer=0x8108A2E8
    Kernel read from flash disk started finished

  • When debug output is enabled there should appear some additional messages (Bootloader command 'O').


    Additionally the kernel version is stored in registry under [HKLM\Platform]
    (-> How to retrieve the sw versions)

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thanks, was able to read the kernel version.


    Since updating to kernel v1.34, any changes that I make in windows (e.g. Volume settings >> disable sounds for events) are not saved on next power up. Is there something else I need to do to enable saving changes?


    Is there also a way to send such control panel changes to the WinCE registry in a text file? I've looked at the HKEY_LOCAL_MACHINE\Snd\Event & \ControlPanel data and don't notice any changes when I change the control panel volume settings.


    regards,
    Sarah

  • The settings for sound events are located under current_user:


    Code
    1. [HKEY_CURRENT_USER\ControlPanel\Volume]
    2. "Mute"=dword:00000001


    To set some registry files very easily you could use a ndcucfg script file. This must include all ndcucfg commands to execute your changes. And please make shure to save the registry, to make sure that the changes are even available after reboot.
    Example:

    Code
    1. reg opencu
    2. reg open ControlPanel\Volume
    3. reg set val Mute dword 1
    4. reg save
    5. reboot

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • You do not need to mute the sound completly. Just disable all sounds you don't want to be enable in the control panel. Configuration of the system sounds is very flexible. There also is a "sounds" tab available in control panel (Control Panel -> Volume&Sound -> Sounds tab) where you can even configure own, custom sounds.
    After configuration via control panel please save the registry (with ndcucfg command "reg save"), so that your settings are even available after reboot.

    Software developer, F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Close to this is thread is my current issue with sound. I can disable all sounds except my applications sounds. Additionally I want to disable the click sound when the user makes touch screen inputs.
    What are the corresponding settings in HKEY_CURRENT_USER\ControPanel\Volume
    I was not able to disable the click sound so far.
    The only way was to disable it in Windows, then reg save.