all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* play-sound causes "Invalid sound specification" on valid :data (on Windows)
@ 2007-06-15 19:07 ` Michael Schierl
  2007-06-16 10:28   ` Eli Zaretskii
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michael Schierl @ 2007-06-15 19:07 UTC (permalink / raw
  To: bug-gnu-emacs

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

- Load emacs -Q
- Create a valid .au file in a string (it's easier than .wav):

(setq mysound (concat ".snd"       ; magic number
		      "\0\0\0\30"  ; sound offset 0x18
		      "\0\0\0\1"   ; sound length 1 byte
		      "\0\0\0\2"   ; encoding 8-bit PCM
		      "\0\0\37@"   ; sampling rate 8kHZ
		      "\0\0\0\1"   ; 1 channel (mono)
		      "x"))        ; some random "sound"

- check if the string is really unibyte, as it should:

(multibyte-string-p mysound)
  => nil

- play it

(play-sound `(sound :data ,mysound))
  => (error "Invalid sound specification")

- write it to a file

(with-current-buffer (find-file-noselect "~/mysound-tmp.au")
  (delete-region (point-min) (point-max))
  (insert mysound)
  (save-buffer 0)
  (kill-buffer nil))

- Playing it from there does not produce any error, but not sound either
  (should produce a short click sound; tested with other players).

(play-sound '(sound :file "~/mysound-tmp.au"))

- Other .au (and .wav) files play just fine, but no longer if I put them
  into a string.


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: DEU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
M-x r e p o r t <tab> <return>

Recent messages:
("D:\\Progs\\emacs\\bin\\emacs.exe" "-Q")
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: play-sound causes "Invalid sound specification" on valid :data (on Windows)
  2007-06-15 19:07 ` play-sound causes "Invalid sound specification" on valid :data (on Windows) Michael Schierl
@ 2007-06-16 10:28   ` Eli Zaretskii
  2007-06-16 11:38     ` Michael Schierl
  2009-01-12 20:37   ` bug#250: " Juanma Barranquero
  2009-01-14 16:20   ` bug#250: marked as done (play-sound causes "Invalid sound specification" on valid :data (on Windows)) Emacs bug Tracking System
  2 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2007-06-16 10:28 UTC (permalink / raw
  To: Michael Schierl; +Cc: bug-gnu-emacs

> Date: Fri, 15 Jun 2007 21:07:29 +0200
> From: Michael Schierl <schierlm@gmx.de>
> 
> - Load emacs -Q
> - Create a valid .au file in a string (it's easier than .wav):
> 
> (setq mysound (concat ".snd"       ; magic number
> 		      "\0\0\0\30"  ; sound offset 0x18
> 		      "\0\0\0\1"   ; sound length 1 byte
> 		      "\0\0\0\2"   ; encoding 8-bit PCM
> 		      "\0\0\37@"   ; sampling rate 8kHZ
> 		      "\0\0\0\1"   ; 1 channel (mono)
> 		      "x"))        ; some random "sound"
> 
> - check if the string is really unibyte, as it should:
> 
> (multibyte-string-p mysound)
>   => nil
> 
> - play it
> 
> (play-sound `(sound :data ,mysound))
>   => (error "Invalid sound specification")

Thank you for your report.

This is a known limitation: the Windows port of Emacs currently
doesn't support :data for playing sound.  You MUST use :file.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: play-sound causes "Invalid sound specification" on valid :data (on Windows)
  2007-06-16 10:28   ` Eli Zaretskii
@ 2007-06-16 11:38     ` Michael Schierl
  2007-06-16 12:52       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Schierl @ 2007-06-16 11:38 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: bug-gnu-emacs

Eli Zaretskii schrieb:

> This is a known limitation: the Windows port of Emacs currently
> doesn't support :data for playing sound.  You MUST use :file.

Where is this documented? If it is not, please regard this as a
documentation bug.

The only thing I could find is in etc/NEWS:

------
** Sound is now supported on MS Windows.

WAV format is supported on all versions of Windows, other formats such
as AU, AIFF and MP3 may be supported in the more recent versions of
Windows, or when other software provides hooks into the system level
sound support for those formats.
------

Michael

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: play-sound causes "Invalid sound specification" on valid :data (on Windows)
  2007-06-16 11:38     ` Michael Schierl
@ 2007-06-16 12:52       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2007-06-16 12:52 UTC (permalink / raw
  To: Michael Schierl; +Cc: bug-gnu-emacs

> Date: Sat, 16 Jun 2007 13:38:43 +0200
> From: Michael Schierl <schierlm@gmx.de>
> CC:  bug-gnu-emacs@gnu.org
> 
> Eli Zaretskii schrieb:
> 
> > This is a known limitation: the Windows port of Emacs currently
> > doesn't support :data for playing sound.  You MUST use :file.
> 
> Where is this documented?

It wasn't.  I added it to PROBLEMS.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#250: play-sound causes "Invalid sound specification" on valid :data (on Windows)
  2007-06-15 19:07 ` play-sound causes "Invalid sound specification" on valid :data (on Windows) Michael Schierl
  2007-06-16 10:28   ` Eli Zaretskii
@ 2009-01-12 20:37   ` Juanma Barranquero
  2009-01-14 16:20   ` bug#250: marked as done (play-sound causes "Invalid sound specification" on valid :data (on Windows)) Emacs bug Tracking System
  2 siblings, 0 replies; 6+ messages in thread
From: Juanma Barranquero @ 2009-01-12 20:37 UTC (permalink / raw
  To: Michael Schierl; +Cc: 250

On Fri, Jun 15, 2007 at 20:07, Michael Schierl <schierlm@gmx.de> wrote:

> - Create a valid .au file in a string (it's easier than .wav):
>
> (setq mysound (concat ".snd"       ; magic number
>                      "\0\0\0\30"  ; sound offset 0x18
>                      "\0\0\0\1"   ; sound length 1 byte
>                      "\0\0\0\2"   ; encoding 8-bit PCM
>                      "\0\0\37@"   ; sampling rate 8kHZ
>                      "\0\0\0\1"   ; 1 channel (mono)
>                      "x"))        ; some random "sound"
>

[...]

> - Playing it from there does not produce any error, but not sound either
>  (should produce a short click sound; tested with other players).

Does this produce a click sound with other players on Windows? I
tested it with Winamp and it didn't.

OTOH, if you use a sound of 4 bytes or more, it works (in Emacs, and
also Winamp). So it seems like a limitation of Windows (or some
underdocumented feature of the .au file format),


> On Sat, Jun 16, 2007 at 13:52, Eli Zaretskii <eliz@gnu.org> wrote:

> It wasn't.  I added it to PROBLEMS.

I've also added a comment to play-sound's docstring. :device is not
supported, either.

    Juanma






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#250: marked as done (play-sound causes "Invalid sound  specification" on valid :data (on Windows))
  2007-06-15 19:07 ` play-sound causes "Invalid sound specification" on valid :data (on Windows) Michael Schierl
  2007-06-16 10:28   ` Eli Zaretskii
  2009-01-12 20:37   ` bug#250: " Juanma Barranquero
@ 2009-01-14 16:20   ` Emacs bug Tracking System
  2 siblings, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2009-01-14 16:20 UTC (permalink / raw
  To: Juanma Barranquero

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]


Your message dated Wed, 14 Jan 2009 17:14:45 +0100
with message-id <f7ccd24b0901140814n28aee82mb89d0f3d48c9c5@mail.gmail.com>
and subject line Re: bug#250: play-sound causes "Invalid sound specification" on valid :data (on Windows)
has caused the Emacs bug report #250,
regarding play-sound causes "Invalid sound specification" on valid :data (on Windows)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
250: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=250
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 8819 bytes --]

From: Michael Schierl <schierlm@gmx.de>
To: bug-gnu-emacs@gnu.org
Subject: play-sound causes "Invalid sound specification" on valid :data (on Windows)
Date: Fri, 15 Jun 2007 21:07:29 +0200
Message-ID: <4672E371.9050908@gmx.de>

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

- Load emacs -Q
- Create a valid .au file in a string (it's easier than .wav):

(setq mysound (concat ".snd"       ; magic number
		      "\0\0\0\30"  ; sound offset 0x18
		      "\0\0\0\1"   ; sound length 1 byte
		      "\0\0\0\2"   ; encoding 8-bit PCM
		      "\0\0\37@"   ; sampling rate 8kHZ
		      "\0\0\0\1"   ; 1 channel (mono)
		      "x"))        ; some random "sound"

- check if the string is really unibyte, as it should:

(multibyte-string-p mysound)
  => nil

- play it

(play-sound `(sound :data ,mysound))
  => (error "Invalid sound specification")

- write it to a file

(with-current-buffer (find-file-noselect "~/mysound-tmp.au")
  (delete-region (point-min) (point-max))
  (insert mysound)
  (save-buffer 0)
  (kill-buffer nil))

- Playing it from there does not produce any error, but not sound either
  (should produce a short click sound; tested with other players).

(play-sound '(sound :file "~/mysound-tmp.au"))

- Other .au (and .wav) files play just fine, but no longer if I put them
  into a string.


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: DEU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
M-x r e p o r t <tab> <return>

Recent messages:
("D:\\Progs\\emacs\\bin\\emacs.exe" "-Q")
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done


_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs




[-- Attachment #3: Type: message/rfc822, Size: 2739 bytes --]

From: "Juanma Barranquero" <lekktu@gmail.com>
To: "Michael Schierl" <schierlm@gmx.de>
Cc: 250-done@emacsbugs.donarmstrong.com
Subject: Re: bug#250: play-sound causes "Invalid sound specification" on valid :data (on Windows)
Date: Wed, 14 Jan 2009 17:14:45 +0100
Message-ID: <f7ccd24b0901140814n28aee82mb89d0f3d48c9c5@mail.gmail.com>

OK, I'm closing this, as the documentation is fixed, and the other
reported problem seems not to be a bug (or, at least, not an Emacs
bug).


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-14 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <f7ccd24b0901140814n28aee82mb89d0f3d48c9c5@mail.gmail.com>
2007-06-15 19:07 ` play-sound causes "Invalid sound specification" on valid :data (on Windows) Michael Schierl
2007-06-16 10:28   ` Eli Zaretskii
2007-06-16 11:38     ` Michael Schierl
2007-06-16 12:52       ` Eli Zaretskii
2009-01-12 20:37   ` bug#250: " Juanma Barranquero
2009-01-14 16:20   ` bug#250: marked as done (play-sound causes "Invalid sound specification" on valid :data (on Windows)) Emacs bug Tracking System

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.