Forums

OverviewV-Play 2 Support (Qt 5)No sound on iPad › Reply To: No sound on iPad

OverviewV-Play 2 Support (Qt 5)No sound on iPad › Reply To: No sound on iPad
#8945

Martin

I’m using BackgroundMusic for the music.

I’m using SoundEffectVPlay for the sounds.

In each case, the source property is pointing to a .wav in ../../assets/wav

I think that it’s based on what I saw in the examples (I started from MultiLevelMultiScene example).

 

 

    BackgroundMusic {
        id: backgroundMusic
        autoPlay: true
        volume: 0.9
        Behavior on source {
            NumberAnimation {
                target: backgroundMusic; property: "volume";
                from: 0; to: 0.9; duration: 4000;
                easing: Easing.InQuint
            }
        }
    }

    state: "selectLevel"
    activeScene: selectLevelScene

    // state machine, takes care reversing the PropertyChanges when changing the state, like changing the opacity back to 0
    states: [
        State {
            name: "selectLevel"
            PropertyChanges {target: selectLevelScene; opacity: 1}
            PropertyChanges {target: window; activeScene: selectLevelScene}
            PropertyChanges {target: backgroundMusic;
                source: "../assets/wav/levelselect.wav"}
        },

 

Under android, I see lots of messages like:

 

V/MediaPlayer-JNI(29416): native_setup
V/MediaPlayer(29416): constructor
V/MediaPlayer(29416): setListener
V/MediaPlayer-JNI(29416): setVolume: left 1.000000  right 1.000000
V/MediaPlayer(29416): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI(29416): setDataSourceFD: fd 66
V/MediaPlayer(29416): setDataSource(66, 10631840, 1228844)
V/MediaPlayer(29416): setVideoSurfaceTexture
V/MediaPlayer(29416): prepareAsync
V/MediaPlayer(29416): message received msg=200, ext1=973, ext2=0

 

I don’t see anything about sound under IOS.

 

  • This reply was modified 3 years, 5 months ago by  GreenAsJade.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support