403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/orca/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/orca/__pycache__/sound.cpython-310.pyc
o

S�b��@s�dZdZdZdZdZdZddlZddlmZze�	d	d
�ddlm
Z
WndaYne
�d�\aZ
d
dlmZd
dlmZmZGdd�d�Ze�Zdd�ZdS)zUtilities for playing sounds.z$Id:$z$Revision:$z$Date:$zCopyright (c) 2016 Orca Team�LGPL�N)�GLib�Gstz1.0)rF�)�debug)�Icon�Tonec@sheZdZdZdd�Zdd�Zdd�Zdd	�Zddd�Zdd
d�Z	dd�Z
ddd�Zddd�Zdd�Z
dS)�PlayerzPlays Icons and Tones.cCsFd|_d|_d|_d|_d|_tsd}t�tj|d�dS|�	�dS)NFz'SOUND ERROR: Gstreamer is not availableT)
�_initialized�_source�_sink�_player�	_pipeline�_gstreamerAvailabler�println�
LEVEL_INFO�init)�self�msg�r�,/usr/lib/python3/dist-packages/orca/sound.py�__init__-szPlayer.__init__cC�l|jtjjkr|j�tjj�dS|jtjjkr4|j�tjj�|�	�\}}d|}t
�t
j|d�dSdS�NzSOUND ERROR: %sT)
�typer�MessageType�EOSr
�	set_state�State�NULL�ERROR�parse_errorrrr�r�bus�message�error�inforrrr�_onPlayerMessage;��zPlayer._onPlayerMessagecCrr)
rrrrrrrrr r!rrrr"rrr�_onPipelineMessageDr(zPlayer._onPipelineMessagecCs|�tjj�dS)NF)rrrr�r�elementrrr�
_onTimeoutMszPlayer._onTimeoutTcCs<|r
|j�tjj�|j�dd|j�|j�tjj�dS)zIPlays a sound icon, interrupting the current play first unless specified.�uriz	file://%sN)r
rrrr�set_property�path�PLAYING)r�icon�	interruptrrr�	_playIconQszPlayer._playIconcCsx|r
|j�tjj�|j�d|j�|j�d|j�|j�d|j	�|j�tjj
�td|j�}t
�||j|j�dS)zCPlays a tone, interrupting the current play first unless specified.�volume�freq�wavei�N)rrrrrrr.r4�	frequencyr6r0�int�durationr�timeout_addr,)r�toner2r9rrr�	_playToneZszPlayer._playTonecCs�|jrdSts	dStj�dd�|_|jdur"d}t�tj|d�dS|j�	�}|�
�|�d|j�tj
dd�|_|j�	�}|�
�|�d|j�tj�d	d
�|_tj�dd�|_|jdusc|jduredS|j�|j�|j�|j�|j�|j�d|_dS)
z(Re)Initializes the Player.N�playbin�playerz7SOUND ERROR: Gstreamer is available, but player is NoneTr$z
orca-pipeline)�name�audiotestsrc�src�
autoaudiosink�output)r
rr�ElementFactory�maker
rrr�get_bus�add_signal_watch�connectr'�Pipelinerr)rr�add�link)rrr#rrrrgs0



zPlayer.initcCsPt|t�r
|�||�dSt|t�r|�||�dSd|}t�tj|d�dS)zDPlays a sound, interrupting the current play first unless specified.z&SOUND ERROR: %s is not an Icon or ToneTN)�
isinstancerr3rr<rrr)r�itemr2rrrr�play�s

zPlayer.playNcCsRtsdS|r|�tjj�dS|jr|j�tjj�|jr'|j�tjj�dSdS)zStops play.N)rrrrrr
rr*rrr�stop�s�zPlayer.stopcCstsdS|��d|_dadS)zShuts down the sound utilities.NF)rrOr
)rrrr�shutdown�s
zPlayer.shutdown)T�N)�__name__�
__module__�__qualname__�__doc__rr'r)r,r3r<rrNrOrPrrrrr	*s		

	
#
r	cCstSrQ)r
rrrr�	getPlayer�srV)rU�__id__�__version__�__date__�
__copyright__�__license__�gi�
gi.repositoryr�require_versionrr�
init_check�args�r�sound_generatorrrr	r
rVrrrr�<module>s(

Youez - 2016 - github.com/yon3zu
LinuXploit