Plugin:MirLua/Module/m sounds/de: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
(Updating to match new version of source page)
No edit summary
 
(18 intermediate revisions by 2 users not shown)
Line 2: Line 2:
Erlaubt es Ihnen mit Sounds zu arbeiten.
Erlaubt es Ihnen mit Sounds zu arbeiten.


Include module: <code>local sounds = require('m_sounds')</code>
{{Ls|MirLua/Modules/include_info}} <code>local sounds = require('m_sounds')</code>
 
{{Note|Parameters written in '''''bold italics''''' are obligatory.}}
 


__TOC__
__TOC__
== Funktionen ==
=== AddSound ===
Registriert einen Sound


=== AddSound ===
==== {{Ls|MirLua/Modules/parameters}} ====
Registers a sound.
{| class="wikitable"
|-
! scope="col" | {{Ls|MirLua/Modules/param_name}}
! scope="col" | {{Ls|MirLua/Modules/required_param}}
! scope="col" | {{Ls|Content/TableHeaders/type}}
! scope="col" | {{Ls|Content/TableHeaders/description}}
|-
! scope="row" class="MirLuaParametersTable-parameter" | name
| style="text-align:center" | {{Ls|YesNo/yes}}
| style="text-align:center" | <code>string</code>
| Eindeutiger Name.
|-
! scope="row" class="MirLuaParametersTable-parameter" | description
| style="text-align:center" | {{Ls|YesNo/yes}}
| style="text-align:center" | <code>string</code>
| Beschreibung.
|-
! scope="row" class="MirLuaParametersTable-parameter" | section
| style="text-align:center" | {{Ls|YesNo/no}}
| style="text-align:center" | <code>string</code>
| Name der Gruppe in den Miranda-Sound-Einstellungen. Standardmäßig wird der Name des Plugins (''MirLua'') verwendet.
|-
! scope="row" class="MirLuaParametersTable-parameter" | path
| style="text-align:center" | {{Ls|YesNo/no}}
| style="text-align:center" | <code>string</code>
| Pfad zur Sounddatei.
|}


; {{Ls|MirLua/Modules/parameters}}
==== {{Ls|MirLua/Modules/result}} ====
: '''''name'''''
{{nbsp|5}}{{Ls|MirLua/Modules/type}} <code>boolean</code>
:: Type: '''string'''
:: Unique name.
: '''''description'''''
:: Type: '''string'''
:: Description.
: ''section''
:: Type: '''string'''
:: Section name in Miranda sound settings. By default plugin name (''MirLua'') is used.
: ''path''
:: Type: '''string'''
:: Path to sound file.


; Result
{{nbsp|5}}Gibt <code>true</code> zurück wenn der Sound erfolgreich registriert wurde, anderenfalls <code>false</code>.
: Type: '''boolean'''
: Returns '''true''' if sound was registered successfully, otherwise '''false'''.


; Example
==== {{Ls|MirLua/Modules/example}} ====
{{Content:MirLua/Example|code=local hIcon = sounds.AddSound('soundUniqueName', 'My super icon')}}
{{Content:MirLua/Example|code=local hIcon = sounds.AddSound('soundUniqueName', 'My super icon')}}
----


=== PlaySound ===
=== PlaySound ===
Plays sound by its unique name.
Spielt den Sound zum eindeutigen Namen.


; Parameters
==== {{Ls|MirLua/Modules/parameters}} ====
: '''''name'''''
{| class="wikitable"
:: Type: '''string'''
|-
:: Unique name.
! scope="col" | {{Ls|MirLua/Modules/param_name}}
! scope="col" | {{Ls|MirLua/Modules/required_param}}
! scope="col" | {{Ls|Content/TableHeaders/type}}
! scope="col" | {{Ls|Content/TableHeaders/description}}
|-
! scope="row" class="MirLuaParametersTable-parameter" | name
| style="text-align:center" | {{Ls|YesNo/yes}}
| style="text-align:center" | <code>string</code>
| Eindeutiger Name.
|}


; Result
==== {{Ls|MirLua/Modules/result}} ====
: Type: '''boolean'''
{{nbsp|5}}{{Ls|MirLua/Modules/type}} <code>boolean</code>
: Returns '''true''' if sound was played successfully, otherwise '''false'''.


; Example
{{nbsp|5}}Gibt <code>true</code> zurück wenn der Sound erfolgreich abgespielt wurde, anderenfalls <code>false</code>.
 
==== {{Ls|MirLua/Modules/example}} ====
{{Content:MirLua/Example|code=sounds.PlaySound('soundUniqueName')}}
{{Content:MirLua/Example|code=sounds.PlaySound('soundUniqueName')}}
----


=== PlayFile ===
=== PlayFile ===
Plays sound from file.
Spielt Sound aus einer Datei.
 
==== {{Ls|MirLua/Modules/parameters}} ====
{| class="wikitable"
|-
! scope="col" | {{Ls|MirLua/Modules/param_name}}
! scope="col" | {{Ls|MirLua/Modules/required_param}}
! scope="col" | {{Ls|Content/TableHeaders/type}}
! scope="col" | {{Ls|Content/TableHeaders/description}}
|-
! scope="row" class="MirLuaParametersTable-parameter" | path
| style="text-align:center" | {{Ls|YesNo/yes}}
| style="text-align:center" | <code>string</code>
| Pfad zur Datei.
|}


; Parameters
==== {{Ls|MirLua/Modules/result}} ====
: '''''path'''''
{{nbsp|5}}{{Ls|MirLua/Modules/type}} <code>boolean</code>
:: Type: '''string'''
:: Path to file.


; Result
{{nbsp|5}}Gibt <code>true</code> zurück wenn der Sound erfolgreich abgespielt wurde, anderenfalls <code>false</code>.
: Type: '''boolean'''
: Returns '''true''' if sound was played successfully, otherwise '''false'''.


; Example
==== {{Ls|MirLua/Modules/example}} ====
{{Content:MirLua/Example|code=sounds.PlayFile('c:\\lambada.wav')}}
{{Content:MirLua/Example|code=sounds.PlayFile('c:\\lambada.wav')}}

Latest revision as of 14:02, 2 June 2018

Other languages:

Erlaubt es Ihnen mit Sounds zu arbeiten.

Inkludieren Sie folgendes Modul: local sounds = require('m_sounds')

Funktionen

AddSound

Registriert einen Sound

Parameter

Parametername Benötigt Typ Beschreibung
name Ja string Eindeutiger Name.
description Ja string Beschreibung.
section Nein string Name der Gruppe in den Miranda-Sound-Einstellungen. Standardmäßig wird der Name des Plugins (MirLua) verwendet.
path Nein string Pfad zur Sounddatei.

Ergebnis

     Typ: boolean

     Gibt true zurück wenn der Sound erfolgreich registriert wurde, anderenfalls false.

Beispiel

local hIcon = sounds.AddSound('soundUniqueName', 'My super icon')

PlaySound

Spielt den Sound zum eindeutigen Namen.

Parameter

Parametername Benötigt Typ Beschreibung
name Ja string Eindeutiger Name.

Ergebnis

     Typ: boolean

     Gibt true zurück wenn der Sound erfolgreich abgespielt wurde, anderenfalls false.

Beispiel

sounds.PlaySound('soundUniqueName')

PlayFile

Spielt Sound aus einer Datei.

Parameter

Parametername Benötigt Typ Beschreibung
path Ja string Pfad zur Datei.

Ergebnis

     Typ: boolean

     Gibt true zurück wenn der Sound erfolgreich abgespielt wurde, anderenfalls false.

Beispiel

sounds.PlayFile('c:\\lambada.wav')