2016-04-16 11 views
0


Ich versuche eine WAV-Audiodatei mit Qt (QSound, QSoundeffekt) auf einem ARM-basierten Atmel-Board (sama5d31ek) abzuspielen.
Ich habe die Rootfs (und Qt SDK für Cross-Compiling) mit Yocto/poky bauen.
Bei der Wiedergabe mit QSound erhalte ich die folgende Protokollmeldung: mit Null-Ausgabegerät, keines verfügbar.
Ich bekomme nichts beim Laufen:Qt - Kein Audio-Ausgabegerät - Yocto/poky

foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput)) 
    qDebug() << "Device name: " << deviceInfo.deviceName(); 

ich die Datei über die Befehlszeile spielen, mit aplay (ALSA).
pulseaudio util fehlt.

Alles?

Cleiton:

> aplay --list-devices 
**** List of PLAYBACK Hardware Devices **** 
card 0: SAMA5D3 [tlv320aic3x @ SAMA5D3], device 0: TLV320AIC3X PCM tlv320aic3x-hifi-0 [] 
    Subdevices: 1/1 
    Subdevice #0: subdevice #0 

> cat /proc/asound/card0/pcm0p/info 
card: 0 
device: 0 
subdevice: 0 
stream: PLAYBACK 
id: TLV320AIC3X PCM tlv320aic3x-hifi-0 
name: 
subname: subdevice #0 
class: 0 
subclass: 0 
subdevices_count: 1 
subdevices_avail: 1 

Kein Ton mit dem folgenden Befehl:

> aplay -D hw:0,0 35_800.wav 
Playing WAVE '35_800.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono 
aplay: set_params:1241: Sample format non available 
Available formats: 
- S16_LE 
- S24_LE 
- S32_LE 

Audio mit dem folgenden Befehl zu spielen:

> aplay -D plughw:0,0 35_800.wav 
Playing WAVE '35_800.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono 

Looping über QAudioDeviceInfo: keine Geräte gefunden.

dank

Antwort

0

hinzufügen Pakete alsa-utils und ausführen:

$ aplay --list-devices 
**** List of PLAYBACK Hardware Devices **** 
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog >[ALC269VB Analog] 
    Subdevices: 1/1 
    Subdevice #0: subdevice #0 
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] 
    Subdevices: 1/1 
    Subdevice #0: subdevice #0 

Dann wird auf dem Ausgabelauf abhängig:

aplay -D plughw:0,0 music.wav 

Oder:

$ cat /proc/asound/card0/pcm0p/info 
card: 0 
device: 0 
subdevice: 0 
stream: PLAYBACK 
id: HDMI 0 
name: HDMI 0 
subname: subdevice #0 
class: 0 
subclass: 0 
subdevices_count: 1 
subdevices_avail: 1 

Verwendung:

aplay -D hw:0,0 music.wav 

Dann mit Qt, können Sie die Geräte Liste mit:

QList <QAudioDeviceInfo> devices = QAudioDeviceInfo :: availableDevices (QAudio :: AudioOutput); 
foreach (i QAudioDeviceInfo, devices) 
    // Print the devices here! 

Versuchen und die Ergebnisse hier posten!

+0

Ich habe die Frage bearbeitet –