Results 1 to 4 of 4

Thread: AUDIO Volume Normalize

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 1999
    Location
    London
    Posts
    76

    Question AUDIO Volume Normalize

    Hi guys,
    I have my own VB6 "media player" which I use mostly to play musics, my music "library" came from different sources and file formats, including music videos so, I have files ranging from wav, mp3 to mp4 and mkv I'm using a VLC plugin to play the files, the problem is like i said, the different sources resulted in different audio volume levels for each file.

    I've spent the afternoon searching for information and solutions for a very basic volume normalize. I've found really cool VU meters and etc but none works with WAVEOut only with WAVEin (audio recording apps mostly). I may be missing something very basic as I thought it should be in VB, because I'm not sure if I'm using the correct term for what I need "Audio normalization" ?

    There is any way to get the volume range from a media file and then set the system master volume or VLC player volume adequately?

    I've looked into Core Audio Interfaces, AudioEndpointVolume, IMMEndpoint, IAudioStreamVolume, but no success in how to GET the volume levels info.

    Any help will be appreciated,

    Thanks,
    MBS
    MBS

  2. #2
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,647

    Re: AUDIO Volume Normalize

    Have you looked into IPerChannelDbLevel?
    The IPerChannelDbLevel interface represents a generic subunit control interface that provides per-channel control over the volume level, in decibels, of an audio stream or of a frequency band in an audio stream.
    Or IAudioMeterInformation.GetPeakValue/.GetChannelsPeakValues? There's quite a few core audio interfaces that would seem to provide the info you need.

    Edit: The first one may just solve the entire issue for you; it has this function:
    SetLevelUniform

    Sets all channels in the audio stream to the same uniform volume level, in decibels.

    http://www.windows-tech.info/14/93b9bff2aae20bd0.php has some code that points down the difficult road of obtaining that interface... IAudioMeterInformation is much easier to get, just a .Activate call from IMMDevice.
    Last edited by fafalone; May 22nd, 2018 at 02:19 AM.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 1999
    Location
    London
    Posts
    76

    Re: AUDIO Volume Normalize

    Hey
    Quote Originally Posted by fafalone View Post
    .
    , thanks so much for your input, I found your "Core Audio Demos" using your oleexp, would be hard to you to implement the GetPeakValue in your Library? If you could so, I would use your tlb, I liked many of its features and the most important the source code is open. Great work man!
    While I wait for your reply I will play with your tlb LOL. Thanks again mate.
    MBS

  4. #4
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,647

    Re: AUDIO Volume Normalize

    It's in there already (both of them, and the IIDs are in mCoreAudio.bas)... if there's an error using it let me know and I'll try to help, but I'm not an expert on core audio.

Posting Permissions

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



Click Here to Expand Forum to Full Width