use strict;
use warnings;
use Win32::Sound;

# Datei mit Musik ...
my $file = 'pomp.wav';

# Systemklang ausgeben
Win32::Sound::Play('SystemStart');

# Erst einmal Device-Infos einsammeln ...
my @devices = Win32::Sound::Devices();
# ... und ausgeben
for my $dev (@devices)
  {
  my %info = Win32::Sound::DeviceInfo($dev);
  print "$dev\n";
  print "    Hersteller-Id: $info{manufacturer_id}\n";
  print "    Produkt-Id:    $info{product_id}\n";
  print "    $info{name}, Version $info{driver_version}\n";
  }

# Was ist mit der Datei los?
my ($hz, $bit, $chan) = Win32::Sound::Format($file);
print "Sample rate: $hz Hz, $bit Bits, $chan Kanaele\n";

# EIngestellte Lautstaerke
my ($l, $r) = Win32::Sound::Volume();
print "Aktuelle Lautstaerke L: $l, R: $r\n";

# Voll aufdrehen und losschmettern
Win32::Sound::Volume('100%','100%');
Win32::Sound::Play($file);

# eigentlich unnoetig
Win32::Sound::Stop();
