OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[Solved] Beep statement does not beep

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
v_mil
General User
General User


Joined: 24 Oct 2011
Posts: 13
Location: Kyiv

PostPosted: Fri Dec 23, 2011 2:19 am    Post subject: [Solved] Beep statement does not beep Reply with quote

Dear Members!

After reinstalling Ubuntu to 11.04 and upgrading to LibreOffice 3.4.4 beep statement does not beep.To test I try a macro from help:

Code:
Sub ExampleBeep
beep
beep
beep
end sub


And no sound. I try a function:

Code:
Function Beeep(optional x)
   beep
   beep
   beep
   Beeep=x
End Function


This function returns a value of x without any beep.
What happen???

OS: Ubuntu 11.04 64bit Ukrainian

Sound settings (translated from Ukrainian):
ACTIONS
Volume - maximum
Theme - tested two variants: Ubuntu and My (Alert sound - bark)
Turn on sounds of windows and buttons - tested [ ] and [v]
DEVICES
USB Audio

INPUT
no settings

OUTPUT
USB Audio analog stereo

Please help me!



Moderation probe1: set CODE tags
_________________
Used LibreOffice 4.0.4.2 on Ubuntu 13.04 x64


Last edited by v_mil on Wed Aug 15, 2012 4:53 am; edited 1 time in total
Back to top
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2560
Location: Chonburi Thailand Asia

PostPosted: Fri Dec 23, 2011 2:29 am    Post subject: Reply with quote

My LO 3.4.4 from the project page does the beep.

Your version from Ubuntu? Ask there.
_________________
Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs
Back to top
View user's profile Send private message Visit poster's website
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4791
Location: Netherlands

PostPosted: Fri Dec 23, 2011 2:36 am    Post subject: Reply with quote

It worked for me on Vista. Can you play insert sounds and play them in LiO?
_________________
LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum
Back to top
View user's profile Send private message
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Fri Dec 23, 2011 3:24 am    Post subject: Reply with quote

On my Windows XP, Beep uses the sound that Windows assigns to "Default Sound".
With the Sounds panel you can assign any wav file (or nothing) to that sound.

Search your system and check the sound assigned to "Default Sound" or equivalent.
_________________
Bernard

OpenOffice.org 1.1.5 fr / Apache OpenOffice 4.0.1 / LibreOffice 4.1.0
MS-Windows 7 Home SP1
This forum is spammed, use instead Apache OpenOffice forums
Back to top
View user's profile Send private message Visit poster's website
v_mil
General User
General User


Joined: 24 Oct 2011
Posts: 13
Location: Kyiv

PostPosted: Fri Dec 23, 2011 8:18 am    Post subject: Reply with quote

Thanks for reply.
It worked normally until I reinstall Ubuntu because of change of HDD.
As I google this problem today this is a problem with ALSA, not LO/OOO. I loss a possibility to open alsamixer and any 3-d party mixer. Possible it is a problem with automatic updated packet. So, I go to Ubuntu forums
I find only one workaround - to play a custom sound. See
http://www.oooforum.org/forum/viewtopic.phtml?t=123817&highlight=sound
_________________
Used LibreOffice 4.0.4.2 on Ubuntu 13.04 x64
Back to top
View user's profile Send private message
v_mil
General User
General User


Joined: 24 Oct 2011
Posts: 13
Location: Kyiv

PostPosted: Wed Aug 15, 2012 4:52 am    Post subject: Reply with quote

Many thanks for all!
The simple workaround is using the shell command.
<Pathname_of_sound_file as string> maybe replaced with actual path name
In Calc I use a cell named "SignalPath". So I use
ThisComponent.NamedRanges.getByName("SignalPath").ReferredCells.String
Please use ANYTHING that returns a string.

If this document opens in Windows the command "play" may not present or <Pathname_of_sound_file as string> maybe invalid and the function uses Beep. But in Windows Beep may work on all kinds of PC. I did not try it in Windows. I should be very glad for your corrections.

'This Sub is a cross-platform notebook-friendly replacement of Beep
'If file exists but broken the signal may not played. Please test it before using
Sub Beeper
Dim SignalPath as string
On local Error goto Beeper_Error
Dim Res
SignalPath=<Pathname_of_sound_file as string>
If FileExists(SignalPath) then
shell("play",6,SignalPath)
Exit Sub
End If
Beeper_Error:
On local Error goto 0:
Beep
End Sub
<\code>
_________________
Used LibreOffice 4.0.4.2 on Ubuntu 13.04 x64
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group