Tech Off Thread

6 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

media player/media element maximum sound problem

Back to Forum: Tech Off
  • User profile image
    trun_gup

    i have created WPF application that plays sound and runs in wpf environment, i have used media element/media player , but both are not able to play sound at maximum volume although i have assigned volume property to 1. the same sound when i run on media playerof vista, it plays sound at maximum level. what should i use to tackle this problem? 

  • User profile image
    footballism

        I don't what's wrong with you, but this code works great for me:
    <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <Grid>
            <StackPanel>
                <Slider Name="mySlider" Value="1" Minimum="0" Maximum="1"/>
                <MediaElement Source="f:\My Documents\My Music\Alien\The Beatles\Yesterday.wma"
                                            Volume="{Binding Path=Value, ElementName=mySlider}"/>
            </StackPanel>
        </Grid>
    </Page>

        When you move the slider thumb back and forth, the volume of the playback does get changed.

    Sheva

  • User profile image
    trun_gup

    see problem is not in its volume property, that is set to 1, but point is in vista's per-application volume control, that volume control dips back to half level wheevr i start playing the sound

  • User profile image
    footballism

        I will try my code on Vista later on, because currently I am logging on to XP SP2.

    Sheva

  • User profile image
    footballism

        I think what you are trying to do is to control the system audio volume which cannot be directly done by WPF.

    Sheva

  • User profile image
    trun_gup

    i thnk probably ur rght.. but i manged it using directX to playback sounds instead of using MediaElement/or MediaPlayer

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.