Re: [SailfishDevel] Playing a wav in Sailfish

2013-06-16 Thread joao morgado


Hi Chris

Thanks for your help. I activated the audio in virtualbox with the options 
PulseAudio and ICH AC97 (I tested other options also), tested your program and 
still no sound. From what I've googled, it seems to be a virtualbox problem, 
some people fix it by changing PulseAudio and ICH AC97 options, but to me still 
didnt work.


I tried to ssh  the sdk with ssh -i ~/.ssh/mer-qt-creator-rsa mersdk@localhost 
-p  but I got an error: 
Agent admitted failure to sign using the key.
Permission denied (publickey).

I got the same error trying to ssh the emulator, don't know why I, because from 
the QtCreator Tools - Options - devices , I can sucessfully test the 
connections with the emulator.

At least I know that it's not  a problem with my code.

Regards
João





 De: christopher.l...@thurweb.ch christopher.l...@thurweb.ch
Para: joao morgado joaodeusmorg...@yahoo.com 
Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org 
Enviadas: Sexta-feira, 14 de Junho de 2013 7:49
Assunto: Re: [SailfishDevel] Playing a wav in Sailfish
 

Hi João

I have just made a little demo project, importing QtMultimediaKit 1.1,  
and a SoundEffect Component.

I added a Button component to the Column to play the sound when clicked.

My Demo works, I get a swish sound when the button is clicked.

You will find the code of my FirstPage at the bottom of this mail.  
Create a new demo project, and paste my code into the FirstPage.

Note I copied my wav to the pages folder (alongside FirstPage). Please  
substitute your own wav file - I grabbed the first one I could find on  
the train. Put you wav in the Pages folder.


Do you get any sound at all from the Emulator? For instance on a demo  
new project with the PullDownMenu you should get a distinct click  
sound when the menu opens.

On the known issues page  
https://sailfishos.org/wiki/SDK_Alpha_Known_Issues#Emulator I found  
this:

The sound is not enabled in the Emulator. Fix: Shutdown the emulator;  
Open virtualbox manager; Pick SailfishOS Emulator, Pick Settings,  
pick Audio, Enable audio (default driver). Accept. Start Emulator. The  
Pulley menus make a sound for testing purposes.

Assuming that you do get sound, do you have QtMultimedia installed?

Connect to the SDK by SSH and search for QtMultimedia with zipper:

zypper se multi

I get this:

S | Name                                             | Zusammenfassung  
                                | Typ
--+--++--
   | libdeclarative-multimedia                        | Qt Mobility  
Multimedia QML plugin              | Paket
   | libqtmultimediakit1                              | Qt Mobility  
MultimediaKit module               | Paket
i | multi_c_rehash                                   | A c_rehash  
implementation in C                 | Paket
   | multi_c_rehash-debuginfo                         | Debug  
information for package multi_c_rehash   | Paket
   | multi_c_rehash-debugsource                       | Debug sources  
for package multi_c_rehash       | Paket


Repeat with the the Emulator:

If  you don't get anything like this then you will have to install  
QtMultimedia.

Chris


//Start FirstPage.qml
import QtQuick 1.1
import Sailfish.Silica 1.0
import QtMultimediaKit 1.1

Page {
     id: page

     // To enable PullDownMenu, place our content in a SilicaFlickable
     SilicaFlickable {
         anchors.fill: parent

         // PullDownMenu and PushUpMenu must be declared in  
SilicaFlickable, SilicaListView or SilicaGridView
         PullDownMenu {
             MenuItem {
                 text: Show Page 2
                 onClicked: pageStack.push(Qt.resolvedUrl(SecondPage.qml))
             }
         }

         // Tell SilicaFlickable the height of its content.
         contentHeight: childrenRect.height

         // Place our content in a Column.  The PageHeader is always  
placed at the top
         // of the page, followed by our content.
         Column {
             width: page.width
             spacing: theme.paddingLarge
             PageHeader {
                 title: UI Template
             }
             Label {
                 x: theme.paddingLarge
                 text: Hello Sailors
                 color: theme.secondaryHighlightColor
                 font.pixelSize: theme.fontSizeLarge
             }
             Button {
                 text: Sound
                 onClicked: mySound.play()
             }
         }
         SoundEffect { id: mySound
             //substitue your own wav file here, and copy it to the  
pages directory!
             //this is the first one I could find while experimenting  
on the train
             source: 92909__Robinhood76__01526_swoosh_2.wav

         }
     }
}
//End FirstPage.qml






Zitat von joao morgado joaodeusmorg...@yahoo.com:

 Hi

 I'm porting a app from Meego/Symbian, I need to play a wav

Re: [SailfishDevel] Playing a wav in Sailfish

2013-06-16 Thread Mariano Boragno
I just wanted to add that I had no sound either at Windows. After
connecting to the emulator through ssh I just used alsamix to adjust the
volume (had to select the sound card in there), it was mutes. That brought
the sound on!


Hope this helps!


Regards...



--



...Mariano Boragno...



On 16/06/13 04:29 christopher.l...@thurweb.ch wrote:
Hi Joao

we need to get your SSH connections working! Just like every driver should
at least be able open the bonnet of a car, so being able to ssh to the SDK
and Emulator is very handy. (and the little boy in me just loves to open
things up ...)

Trekking back to the Alpha known issues page:

https://sailfishos.org/wiki/**SDK_Alpha_Known_Issueshttps://sailfishos.org/wiki/SDK_Alpha_Known_Issues

we find quite a few hints on SSH problems, including:

If you get Agent admitted failure to sign using the key when using ssh,
try setting SSH_AUTH_SOCK=

When I was playing around with a Sailfish on Lubuntu host that fixed it for
me.

Try that on the command line of your development host.

Another possible solution is suggested here (for GitHub, not Sailfish)
https://help.github.com/**articles/error-agent-admitted-**failure-to-signhttps://help.github.com/articles/error-agent-admitted-failure-to-sign


Chris


Zitat von joao morgado joaodeusmorg...@yahoo.com:



 Hi Chris

 Thanks for your help. I activated the audio in virtualbox with the options
 PulseAudio and ICH AC97 (I tested other options also), tested your program
 and still no sound. From what I've googled, it seems to be a virtualbox
 problem, some people fix it by changing PulseAudio and ICH AC97 options,
 but to me still didnt work.


 I tried to ssh  the sdk with ssh -i ~/.ssh/mer-qt-creator-rsa
 mersdk@localhost -p  but I got an error:
 Agent admitted failure to sign using the key.
 Permission denied (publickey).

 I got the same error trying to ssh the emulator, don't know why I, because
 from the QtCreator Tools - Options - devices , I can sucessfully test the
 connections with the emulator.

 At least I know that it's not  a problem with my code.

 Regards
 João




 __**__
  De: christopher.l...@thurweb.ch christopher.l...@thurweb.ch
 Para: joao morgado joaodeusmorg...@yahoo.com
 Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
 Enviadas: Sexta-feira, 14 de Junho de 2013 7:49
 Assunto: Re: [SailfishDevel] Playing a wav in Sailfish


 Hi João

 I have just made a little demo project, importing QtMultimediaKit 1.1,
 and a SoundEffect Component.

 I added a Button component to the Column to play the sound when clicked.

 My Demo works, I get a swish sound when the button is clicked.

 You will find the code of my FirstPage at the bottom of this mail.
 Create a new demo project, and paste my code into the FirstPage.

 Note I copied my wav to the pages folder (alongside FirstPage). Please
 substitute your own wav file - I grabbed the first one I could find on
 the train. Put you wav in the Pages folder.


 Do you get any sound at all from the Emulator? For instance on a demo
 new project with the PullDownMenu you should get a distinct click
 sound when the menu opens.

 On the known issues page
 https://sailfishos.org/wiki/**SDK_Alpha_Known_Issues#**Emulatorhttps://sailfishos.org/wiki/SDK_Alpha_Known_Issues#EmulatorI
  found
 this:

 The sound is not enabled in the Emulator. Fix: Shutdown the emulator;
 Open virtualbox manager; Pick SailfishOS Emulator, Pick Settings,
 pick Audio, Enable audio (default driver). Accept. Start Emulator. The
 Pulley menus make a sound for testing purposes.

 Assuming that you do get sound, do you have QtMultimedia installed?

 Connect to the SDK by SSH and search for QtMultimedia with zipper:

 zypper se multi

 I get this:

 S | Name | Zusammenfassung
 | Typ
 --+---**---+--**
 --**+--
| libdeclarative-multimedia| Qt Mobility
 Multimedia QML plugin  | Paket
| libqtmultimediakit1  | Qt Mobility
 MultimediaKit module   | Paket
 i | multi_c_rehash   | A c_rehash
 implementation in C | Paket
| multi_c_rehash-debuginfo | Debug
 information for package multi_c_rehash   | Paket
| multi_c_rehash-debugsource   | Debug sources
 for package multi_c_rehash   | Paket


 Repeat with the the Emulator:

 If  you don't get anything like this then you will have to install
 QtMultimedia.

 Chris


 //Start FirstPage.qml
 import QtQuick 1.1
 import Sailfish.Silica 1.0
 import QtMultimediaKit 1.1

 Page {
  id: page

  // To enable PullDownMenu, place our content in a SilicaFlickable
  SilicaFlickable {
  anchors.fill: parent

  // PullDownMenu and PushUpMenu must be declared

Re: [SailfishDevel] Playing a wav in Sailfish

2013-06-16 Thread christopher . lamb

Hi João

It's really cool that you have got this working!

What exactly did you do in alsamixer?

If you let us know, then maybe one of the Jolla Sailors will add this  
to the known issues page.


Chris

Zitat von joao morgado joaodeusmorg...@yahoo.com:


Thank all for your precious help, the sound is working now.

Using SSH_AUTH_SOCK=  did the trick, I was able to log in. 
Then in the sdk, alsamixer was unknow, I installed alsa-utils with  
sudo zypper in alsa-utils and still no alsamixer.
It was when I ssh the emulator that I could use alsamixer, the  
problem was in fact the mute and low sound, I had to playaround a  
bit to select the correct sound card. 


Solved :)

Thanks again
João





 De: Mariano Boragno marianobora...@gmail.com
Para: joao morgado joaodeusmorg...@yahoo.com;  
christopher.l...@thurweb.ch christopher.l...@thurweb.ch

Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
Enviadas: Domingo, 16 de Junho de 2013 12:59
Assunto: Re: [SailfishDevel] Playing a wav in Sailfish



I just wanted to add that I had no sound either at Windows. After  
connecting to the emulator through ssh I just used alsamix to adjust  
the volume (had to select the sound card in there), it was mutes.  
That brought the sound on!


Hope this helps!

Regards... 
 
--
 
...Mariano Boragno...
 

On 16/06/13 04:29 christopher.l...@thurweb.ch wrote:

Hi Joao

we need to get your SSH connections working! Just like every driver  
should at least be able open the bonnet of a car, so being able to  
ssh to the SDK and Emulator is very handy. (and the little boy in me  
just loves to open things up ...)


Trekking back to the Alpha known issues page:

https://sailfishos.org/wiki/SDK_Alpha_Known_Issues

we find quite a few hints on SSH problems, including:

If you get Agent admitted failure to sign using the key when using  
ssh, try setting SSH_AUTH_SOCK=


When I was playing around with a Sailfish on Lubuntu host that fixed  
it for me.


Try that on the command line of your development host.

Another possible solution is suggested here (for GitHub, not Sailfish)
https://help.github.com/articles/error-agent-admitted-failure-to-sign


Chris


Zitat von joao morgado joaodeusmorg...@yahoo.com:





Hi Chris

Thanks for your help. I activated the audio in virtualbox with the  
options PulseAudio and ICH AC97 (I tested other options also),  
tested your program and still no sound. From what I've googled, it  
seems to be a virtualbox problem, some people fix it by changing  
PulseAudio and ICH AC97 options, but to me still didnt work.



I tried to ssh  the sdk with ssh -i ~/.ssh/mer-qt-creator-rsa  
mersdk@localhost -p  but I got an error: 

Agent admitted failure to sign using the key.
Permission denied (publickey).

I got the same error trying to ssh the emulator, don't know why I,  
because from the QtCreator Tools - Options - devices , I can  
sucessfully test the connections with the emulator.


At least I know that it's not  a problem with my code.

Regards
João





 De: christopher.l...@thurweb.ch christopher.l...@thurweb.ch
Para: joao morgado joaodeusmorg...@yahoo.com
Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
Enviadas: Sexta-feira, 14 de Junho de 2013 7:49
Assunto: Re: [SailfishDevel] Playing a wav in Sailfish


Hi João

I have just made a little demo project, importing QtMultimediaKit 1.1, 
and a SoundEffect Component.

I added a Button component to the Column to play the sound when clicked.

My Demo works, I get a swish sound when the button is clicked.

You will find the code of my FirstPage at the bottom of this mail. 
Create a new demo project, and paste my code into the FirstPage.

Note I copied my wav to the pages folder (alongside FirstPage). Please 
substitute your own wav file - I grabbed the first one I could find on 
the train. Put you wav in the Pages folder.


Do you get any sound at all from the Emulator? For instance on a demo 
new project with the PullDownMenu you should get a distinct click 
sound when the menu opens.

On the known issues page 
https://sailfishos.org/wiki/SDK_Alpha_Known_Issues#Emulator I found 
this:

The sound is not enabled in the Emulator. Fix: Shutdown the emulator; 
Open virtualbox manager; Pick SailfishOS Emulator, Pick Settings, 
pick Audio, Enable audio (default driver). Accept. Start Emulator. The 
Pulley menus make a sound for testing purposes.

Assuming that you do get sound, do you have QtMultimedia installed?

Connect to the SDK by SSH and search for QtMultimedia with zipper:

zypper se multi

I get this:

S | Name                                             | Zusammenfassung 
                                | Typ
--+--++--
   | libdeclarative-multimedia                        | Qt Mobility 
Multimedia QML plugin              | Paket
   | libqtmultimediakit1

Re: [SailfishDevel] Playing a wav in Sailfish

2013-06-16 Thread Mariano Boragno
Hi Chris,

I don't know if João's system has the same specs as mine (Windows 7 64-bit,
VBox v4.2.12). What I did (same as João) are the following steps:

   1. Connect to the Emulator (SSH or Alt+Ctrl+F2 in the emulator window,
   nemo/nemo to log in).
   2. Run alsamixer in the command line.
   3. Press F6 and select 0 HDA Intel from the list (that is the sound
   card in my case, don't know if it's always the same).
   4. You will find that the master channel is muted. Press M key to unmute
   it and adjust it with the up/down arrow keys.
   5. Do the same for all muted output channels, if there are some.
   6. Press ESC to quit alsamixer.
   7. You are done, sounds was working fine, it was just muted :)

That did the trick for me and seems it did for João too.

João, glad you worked it out! :)


Sail on!



...Mariano Boragno...


On Sun, Jun 16, 2013 at 1:47 PM, christopher.l...@thurweb.ch wrote:

 Hi João

 It's really cool that you have got this working!

 What exactly did you do in alsamixer?

 If you let us know, then maybe one of the Jolla Sailors will add this to
 the known issues page.


 Chris

 Zitat von joao morgado joaodeusmorg...@yahoo.com:

  Thank all for your precious help, the sound is working now.

 Using SSH_AUTH_SOCK=  did the trick, I was able to log in.
 Then in the sdk, alsamixer was unknow, I installed alsa-utils with sudo
 zypper in alsa-utils and still no alsamixer.
 It was when I ssh the emulator that I could use alsamixer, the problem
 was in fact the mute and low sound, I had to playaround a bit to select the
 correct sound card.

 Solved :)

 Thanks again
 João




 __**__
  De: Mariano Boragno marianobora...@gmail.com
 Para: joao morgado joaodeusmorg...@yahoo.com; 
 christopher.l...@thurweb.ch christopher.l...@thurweb.ch
 Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
 Enviadas: Domingo, 16 de Junho de 2013 12:59
 Assunto: Re: [SailfishDevel] Playing a wav in Sailfish



 I just wanted to add that I had no sound either at Windows. After
 connecting to the emulator through ssh I just used alsamix to adjust the
 volume (had to select the sound card in there), it was mutes. That brought
 the sound on!

 Hope this helps!

 Regards...

 --

 ...Mariano Boragno...


 On 16/06/13 04:29 christopher.l...@thurweb.ch wrote:

 Hi Joao

 we need to get your SSH connections working! Just like every driver
 should at least be able open the bonnet of a car, so being able to ssh to
 the SDK and Emulator is very handy. (and the little boy in me just loves to
 open things up ...)

 Trekking back to the Alpha known issues page:

 https://sailfishos.org/wiki/**SDK_Alpha_Known_Issueshttps://sailfishos.org/wiki/SDK_Alpha_Known_Issues

 we find quite a few hints on SSH problems, including:

 If you get Agent admitted failure to sign using the key when using ssh,
 try setting SSH_AUTH_SOCK=

 When I was playing around with a Sailfish on Lubuntu host that fixed it
 for me.

 Try that on the command line of your development host.

 Another possible solution is suggested here (for GitHub, not Sailfish)
 https://help.github.com/**articles/error-agent-admitted-**failure-to-signhttps://help.github.com/articles/error-agent-admitted-failure-to-sign


 Chris


 Zitat von joao morgado joaodeusmorg...@yahoo.com:




 Hi Chris

 Thanks for your help. I activated the audio in virtualbox with the
 options PulseAudio and ICH AC97 (I tested other options also), tested your
 program and still no sound. From what I've googled, it seems to be a
 virtualbox problem, some people fix it by changing PulseAudio and ICH AC97
 options, but to me still didnt work.


 I tried to ssh  the sdk with ssh -i ~/.ssh/mer-qt-creator-rsa
 mersdk@localhost -p  but I got an error:
 Agent admitted failure to sign using the key.
 Permission denied (publickey).

 I got the same error trying to ssh the emulator, don't know why I,
 because from the QtCreator Tools - Options - devices , I can sucessfully
 test the connections with the emulator.

 At least I know that it's not  a problem with my code.

 Regards
 João




 __**__
  De: christopher.l...@thurweb.ch christopher.l...@thurweb.ch
 Para: joao morgado joaodeusmorg...@yahoo.com
 Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
 Enviadas: Sexta-feira, 14 de Junho de 2013 7:49
 Assunto: Re: [SailfishDevel] Playing a wav in Sailfish


 Hi João

 I have just made a little demo project, importing QtMultimediaKit 1.1,
 and a SoundEffect Component.

 I added a Button component to the Column to play the sound when clicked.

 My Demo works, I get a swish sound when the button is clicked.

 You will find the code of my FirstPage at the bottom of this mail.
 Create a new demo project, and paste my code into the FirstPage.

 Note I copied my wav to the pages folder (alongside FirstPage). Please
 substitute your own wav file - I grabbed the first one I could find on
 the train. Put you wav in the Pages folder.


 Do

Re: [SailfishDevel] Playing a wav in Sailfish

2013-06-16 Thread christopher . lamb

Ciao Mariano

The key bit is the user nemo.

I was trying to start alsamixer as user root, and got connection refused.

After connecting via ssh as user nemo alsamixer works!

1000 grazie

Chris


Zitat von Mariano Boragno marianobora...@gmail.com:


Hi Chris,

I don't know if João's system has the same specs as mine (Windows 7 64-bit,
VBox v4.2.12). What I did (same as João) are the following steps:

   1. Connect to the Emulator (SSH or Alt+Ctrl+F2 in the emulator window,
   nemo/nemo to log in).
   2. Run alsamixer in the command line.
   3. Press F6 and select 0 HDA Intel from the list (that is the sound
   card in my case, don't know if it's always the same).
   4. You will find that the master channel is muted. Press M key to unmute
   it and adjust it with the up/down arrow keys.
   5. Do the same for all muted output channels, if there are some.
   6. Press ESC to quit alsamixer.
   7. You are done, sounds was working fine, it was just muted :)

That did the trick for me and seems it did for João too.

João, glad you worked it out! :)


Sail on!



...Mariano Boragno...


On Sun, Jun 16, 2013 at 1:47 PM, christopher.l...@thurweb.ch wrote:


Hi João

It's really cool that you have got this working!

What exactly did you do in alsamixer?

If you let us know, then maybe one of the Jolla Sailors will add this to
the known issues page.


Chris

Zitat von joao morgado joaodeusmorg...@yahoo.com:

 Thank all for your precious help, the sound is working now.


Using SSH_AUTH_SOCK=  did the trick, I was able to log in.
Then in the sdk, alsamixer was unknow, I installed alsa-utils with sudo
zypper in alsa-utils and still no alsamixer.
It was when I ssh the emulator that I could use alsamixer, the problem
was in fact the mute and low sound, I had to playaround a bit to select the
correct sound card.

Solved :)

Thanks again
João




__**__
 De: Mariano Boragno marianobora...@gmail.com
Para: joao morgado joaodeusmorg...@yahoo.com; 
christopher.l...@thurweb.ch christopher.l...@thurweb.ch
Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
Enviadas: Domingo, 16 de Junho de 2013 12:59
Assunto: Re: [SailfishDevel] Playing a wav in Sailfish



I just wanted to add that I had no sound either at Windows. After
connecting to the emulator through ssh I just used alsamix to adjust the
volume (had to select the sound card in there), it was mutes. That brought
the sound on!

Hope this helps!

Regards...

--

...Mariano Boragno...


On 16/06/13 04:29 christopher.l...@thurweb.ch wrote:

Hi Joao

we need to get your SSH connections working! Just like every driver
should at least be able open the bonnet of a car, so being able to ssh to
the SDK and Emulator is very handy. (and the little boy in me just loves to
open things up ...)

Trekking back to the Alpha known issues page:

https://sailfishos.org/wiki/**SDK_Alpha_Known_Issueshttps://sailfishos.org/wiki/SDK_Alpha_Known_Issues

we find quite a few hints on SSH problems, including:

If you get Agent admitted failure to sign using the key when using ssh,
try setting SSH_AUTH_SOCK=

When I was playing around with a Sailfish on Lubuntu host that fixed it
for me.

Try that on the command line of your development host.

Another possible solution is suggested here (for GitHub, not Sailfish)
https://help.github.com/**articles/error-agent-admitted-**failure-to-signhttps://help.github.com/articles/error-agent-admitted-failure-to-sign


Chris


Zitat von joao morgado joaodeusmorg...@yahoo.com:





Hi Chris

Thanks for your help. I activated the audio in virtualbox with the
options PulseAudio and ICH AC97 (I tested other options also), tested your
program and still no sound. From what I've googled, it seems to be a
virtualbox problem, some people fix it by changing PulseAudio and ICH AC97
options, but to me still didnt work.


I tried to ssh  the sdk with ssh -i ~/.ssh/mer-qt-creator-rsa
mersdk@localhost -p  but I got an error:
Agent admitted failure to sign using the key.
Permission denied (publickey).

I got the same error trying to ssh the emulator, don't know why I,
because from the QtCreator Tools - Options - devices , I can sucessfully
test the connections with the emulator.

At least I know that it's not  a problem with my code.

Regards
João




__**__
 De: christopher.l...@thurweb.ch christopher.l...@thurweb.ch
Para: joao morgado joaodeusmorg...@yahoo.com
Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
Enviadas: Sexta-feira, 14 de Junho de 2013 7:49
Assunto: Re: [SailfishDevel] Playing a wav in Sailfish


Hi João

I have just made a little demo project, importing QtMultimediaKit 1.1,
and a SoundEffect Component.

I added a Button component to the Column to play the sound when clicked.

My Demo works, I get a swish sound when the button is clicked.

You will find the code of my FirstPage at the bottom of this mail.
Create a new demo project, and paste my code into the FirstPage.

Note I copied my wav

Re: [SailfishDevel] Playing a wav in Sailfish

2013-06-16 Thread joao morgado
Hi guys

I did exactly the same steps that Mariano did. My system is a Ubuntu based 
distro, 64 bits. 
I ssh the emulator with nemo user, thats the trick. It seems that in some 
systems the master channel is muted by default, wich causes this problem.

All the best  
João



 De: christopher.l...@thurweb.ch christopher.l...@thurweb.ch
Para: Mariano Boragno marianobora...@gmail.com 
Cc: joao morgado joaodeusmorg...@yahoo.com; devel@lists.sailfishos.org 
devel@lists.sailfishos.org 
Enviadas: Domingo, 16 de Junho de 2013 18:24
Assunto: Re: [SailfishDevel] Playing a wav in Sailfish
 

Ciao Mariano

The key bit is the user nemo.

I was trying to start alsamixer as user root, and got connection refused.

After connecting via ssh as user nemo alsamixer works!

1000 grazie

Chris


Zitat von Mariano Boragno marianobora...@gmail.com:

 Hi Chris,

 I don't know if João's system has the same specs as mine (Windows 7 64-bit,
 VBox v4.2.12). What I did (same as João) are the following steps:

    1. Connect to the Emulator (SSH or Alt+Ctrl+F2 in the emulator window,
    nemo/nemo to log in).
    2. Run alsamixer in the command line.
    3. Press F6 and select 0 HDA Intel from the list (that is the sound
    card in my case, don't know if it's always the same).
    4. You will find that the master channel is muted. Press M key to unmute
    it and adjust it with the up/down arrow keys.
    5. Do the same for all muted output channels, if there are some.
    6. Press ESC to quit alsamixer.
    7. You are done, sounds was working fine, it was just muted :)

 That did the trick for me and seems it did for João too.

 João, glad you worked it out! :)


 Sail on!



 ...Mariano Boragno...


 On Sun, Jun 16, 2013 at 1:47 PM, christopher.l...@thurweb.ch wrote:

 Hi João

 It's really cool that you have got this working!

 What exactly did you do in alsamixer?

 If you let us know, then maybe one of the Jolla Sailors will add this to
 the known issues page.


 Chris

 Zitat von joao morgado joaodeusmorg...@yahoo.com:

  Thank all for your precious help, the sound is working now.

 Using SSH_AUTH_SOCK=  did the trick, I was able to log in.
 Then in the sdk, alsamixer was unknow, I installed alsa-utils with sudo
 zypper in alsa-utils and still no alsamixer.
 It was when I ssh the emulator that I could use alsamixer, the problem
 was in fact the mute and low sound, I had to playaround a bit to select the
 correct sound card.

 Solved :)

 Thanks again
 João




 __**__
  De: Mariano Boragno marianobora...@gmail.com
 Para: joao morgado joaodeusmorg...@yahoo.com; 
 christopher.l...@thurweb.ch christopher.l...@thurweb.ch
 Cc: devel@lists.sailfishos.org devel@lists.sailfishos.org
 Enviadas: Domingo, 16 de Junho de 2013 12:59
 Assunto: Re: [SailfishDevel] Playing a wav in Sailfish



 I just wanted to add that I had no sound either at Windows. After
 connecting to the emulator through ssh I just used alsamix to adjust the
 volume (had to select the sound card in there), it was mutes. That brought
 the sound on!

 Hope this helps!

 Regards...

 --

 ...Mariano Boragno...


 On 16/06/13 04:29 christopher.l...@thurweb.ch wrote:

 Hi Joao

 we need to get your SSH connections working! Just like every driver
 should at least be able open the bonnet of a car, so being able to ssh to
 the SDK and Emulator is very handy. (and the little boy in me just loves to
 open things up ...)

 Trekking back to the Alpha known issues page:

 https://sailfishos.org/wiki/**SDK_Alpha_Known_Issueshttps://sailfishos.org/wiki/SDK_Alpha_Known_Issues

 we find quite a few hints on SSH problems, including:

 If you get Agent admitted failure to sign using the key when using ssh,
 try setting SSH_AUTH_SOCK=

 When I was playing around with a Sailfish on Lubuntu host that fixed it
 for me.

 Try that on the command line of your development host.

 Another possible solution is suggested here (for GitHub, not Sailfish)
 https://help.github.com/**articles/error-agent-admitted-**failure-to-signhttps://help.github.com/articles/error-agent-admitted-failure-to-sign


 Chris


 Zitat von joao morgado joaodeusmorg...@yahoo.com:




 Hi Chris

 Thanks for your help. I activated the audio in virtualbox with the
 options PulseAudio and ICH AC97 (I tested other options also), tested your
 program and still no sound. From what I've googled, it seems to be a
 virtualbox problem, some people fix it by changing PulseAudio and ICH AC97
 options, but to me still didnt work.


 I tried to ssh  the sdk with ssh -i ~/.ssh/mer-qt-creator-rsa
 mersdk@localhost -p  but I got an error:
 Agent admitted failure to sign using the key.
 Permission denied (publickey).

 I got the same error trying to ssh the emulator, don't know why I,
 because from the QtCreator Tools - Options - devices , I can sucessfully
 test the connections with the emulator.

 At least I know that it's not  a problem with my code.

 Regards
 João

Re: [SailfishDevel] Playing a wav in Sailfish

2013-06-14 Thread christopher . lamb

Hi João

I have just made a little demo project, importing QtMultimediaKit 1.1,  
and a SoundEffect Component.


I added a Button component to the Column to play the sound when clicked.

My Demo works, I get a swish sound when the button is clicked.

You will find the code of my FirstPage at the bottom of this mail.  
Create a new demo project, and paste my code into the FirstPage.


Note I copied my wav to the pages folder (alongside FirstPage). Please  
substitute your own wav file - I grabbed the first one I could find on  
the train. Put you wav in the Pages folder.



Do you get any sound at all from the Emulator? For instance on a demo  
new project with the PullDownMenu you should get a distinct click  
sound when the menu opens.


On the known issues page  
https://sailfishos.org/wiki/SDK_Alpha_Known_Issues#Emulator I found  
this:


The sound is not enabled in the Emulator. Fix: Shutdown the emulator;  
Open virtualbox manager; Pick SailfishOS Emulator, Pick Settings,  
pick Audio, Enable audio (default driver). Accept. Start Emulator. The  
Pulley menus make a sound for testing purposes.


Assuming that you do get sound, do you have QtMultimedia installed?

Connect to the SDK by SSH and search for QtMultimedia with zipper:

zypper se multi

I get this:

S | Name | Zusammenfassung  
   | Typ

--+--++--
  | libdeclarative-multimedia| Qt Mobility  
Multimedia QML plugin  | Paket
  | libqtmultimediakit1  | Qt Mobility  
MultimediaKit module   | Paket
i | multi_c_rehash   | A c_rehash  
implementation in C | Paket
  | multi_c_rehash-debuginfo | Debug  
information for package multi_c_rehash   | Paket
  | multi_c_rehash-debugsource   | Debug sources  
for package multi_c_rehash   | Paket



Repeat with the the Emulator:

If  you don't get anything like this then you will have to install  
QtMultimedia.


Chris


//Start FirstPage.qml
import QtQuick 1.1
import Sailfish.Silica 1.0
import QtMultimediaKit 1.1

Page {
id: page

// To enable PullDownMenu, place our content in a SilicaFlickable
SilicaFlickable {
anchors.fill: parent

// PullDownMenu and PushUpMenu must be declared in  
SilicaFlickable, SilicaListView or SilicaGridView

PullDownMenu {
MenuItem {
text: Show Page 2
onClicked: pageStack.push(Qt.resolvedUrl(SecondPage.qml))
}
}

// Tell SilicaFlickable the height of its content.
contentHeight: childrenRect.height

// Place our content in a Column.  The PageHeader is always  
placed at the top

// of the page, followed by our content.
Column {
width: page.width
spacing: theme.paddingLarge
PageHeader {
title: UI Template
}
Label {
x: theme.paddingLarge
text: Hello Sailors
color: theme.secondaryHighlightColor
font.pixelSize: theme.fontSizeLarge
}
Button {
text: Sound
onClicked: mySound.play()
}
}
SoundEffect { id: mySound
//substitue your own wav file here, and copy it to the  
pages directory!
//this is the first one I could find while experimenting  
on the train

source: 92909__Robinhood76__01526_swoosh_2.wav

}
}
}
//End FirstPage.qml






Zitat von joao morgado joaodeusmorg...@yahoo.com:


Hi

I'm porting a app from Meego/Symbian, I need to play a wav file. I  
used importQtMultimediaKit1.1 and SoundEffect element. I  
tought QtMultimediaKit was only available in Meego / Symbian, but my  
app runs fine in the emulator, so I guess I'm good to go. I don't  
hear any sound, I'm assuming it's a emulator limitation, can please  
someone confirm that ?


Thanks
João de Deus




___
SailfishOS.org Devel mailing list


[SailfishDevel] Playing a wav in Sailfish

2013-06-13 Thread joao morgado
Hi

I'm porting a app from Meego/Symbian, I need to play a wav file. I used 
importQtMultimediaKit1.1 and SoundEffect element. I tought QtMultimediaKit was 
only available in Meego / Symbian, but my app runs fine in the emulator, so I 
guess I'm good to go. I don't hear any sound, I'm assuming it's a emulator 
limitation, can please someone confirm that ?

Thanks
João de Deus___
SailfishOS.org Devel mailing list