VB6 RC5-CoreAudio-Demo-VBForums
Results 1 to 6 of 6

Thread: VB6 RC5-CoreAudio-Demo

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    3,105

    VB6 RC5-CoreAudio-Demo

    Here a small CoreAudio-Example, based on the appropriate abstraction-Classes of the RichClient.
    (as mentioned and requested in this thread): http://www.vbforums.com/showthread.p...ther-like-Game

    CoreAudio was introduced as the new (LowLevel) SoundAPI for Win-Versions from Vista onwards.

    It allows such things as "InApp-Session-VolumeControl, Soundbuffer-reading and -writing, Enumeration of
    Sound-Devices, Fine-Control over each of the channels of e.g. a "5+1" SoundCard etc...

    The Read-direction of CoreAudio-SoundBuffers I've already covered in this older example here:
    http://www.vbforums.com/showthread.p...and-onwards%29
    (visualizing the Buffer-Input, which comes in over: ...GetDefaultAudioEndpoint(eCapture, eCommunications) -> usually the microphone).

    This example here is focusing on demonstrating the handling of "InApp-SoundVolume/Muting" -
    and the SoundRendering of 4 smaller SoundBuffers (which reside as *.mp3 in the Apps \Res\-SubFolder).
    Here the Zip: CoreAudioDemo.zip

    With relatively low efforts, one could expand on this Demo, to e.g. implement a nice
    "Piano-Roll-like Sequencer" - or something alike (as seen in some Phone- or -Tablet-Apps, that cover
    simple "SoundLoop-Pattern-Mixers" which support live-changes of "correctly fitted" Sample-Loops).

    Here's a ScreenShot, what the Demo currently looks like:


    The 4 SoundSample-Player-Widgets to the right of the above Form can be:
    - in case of the Top-Widget, labelled 'SampleLoop' - switched On and Off permanently
    - and the lower three Sound-Widgets are in "Tap-Mode" (acting more like a little Drum-Kit)

    So you can Switch-On the TopMost Sound - it will be in repeat-mode by default -
    and then you can add sound by "tapping" the other three (if you keep the Mouse down,
    the 3 Tap-Widgets will repeat themselves in a timely fashion).

    So, whilst the right part of the above ScreenShot demonstrates the CoreAudio-SoundBuffer-Handling,
    the left part of the Screen (the rotating Knob-Widget) demonstrates the interaction with:
    - cSimpleAudioVolume (responsible for interaction with the InApp-SoundLevel and InApp-Muting)
    - cAudioMeterInformation (responsible for the Peak-Meter-Visualization at the bottom of the Knob).

    This InApp-AudioVolume-Handling works in a "two-way-fashion", since it is also present in
    the new WinSystem-Mixer-Dialogues:


    In the above ScreenShot, the focused Entry labeled "CoreAudioDemo" allows to
    control your InApp-SoundVolume/Muting as well - and should be properly reflected
    in the appropriate Control of your App, so that both GUI-interactions remain "synced"
    (the Knob reflecting the Settings of the System-Dialogue, and vice versa).



    The cSimpleAudioVolume-Class of the RC5 offers the needed Events for that kind of
    two-way interaction.

    But take a look at the code yourself, play around a bit - and just ask when something is not clear.

    Have fun!

    Olaf
    Last edited by Schmidt; May 17th, 2016 at 08:27 PM.

  2. #2
    Fanatic Member
    Join Date
    Apr 2012
    Posts
    873

    Re: VB6 RC5-CoreAudio-Demo

    Much appreciated, Olaf. Checking it out now...
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  3. #3
    New Member
    Join Date
    Mar 2017
    Posts
    1

    Re: VB6 RC5-CoreAudio-Demo

    Is there a way to control the other app volumes, rather than just the current app ? I've had a look but can fathom it out or see any documentation.thank you.

  4. #4
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    404

    Re: VB6 RC5-CoreAudio-Demo

    When I tested the RC5-CoreAudio-Demo on Win10, everything was OK. But when I tested it on XP, there was an error message: Couldn't create DeviceEnumerator
    Attached Images Attached Images  
    Last edited by dreammanor; Sep 10th, 2017 at 08:14 AM.

  5. #5
    Fanatic Member
    Join Date
    Apr 2012
    Posts
    873

    Re: VB6 RC5-CoreAudio-Demo

    CoreAudio is only available on Vista and upwards...
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  6. #6
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    404

    Re: VB6 RC5-CoreAudio-Demo

    Quote Originally Posted by ColinE66 View Post
    CoreAudio is only available on Vista and upwards...
    Oh, thank you for your reminder. I was so blind that I didn't see Olaf's instructions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.