Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 652d01a

Browse files
Mais codigos adicionados, falta explicaçao e imagens
1 parent 63c8c25 commit 652d01a

File tree

8 files changed

+26
-4
lines changed

8 files changed

+26
-4
lines changed

‎README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,4 +316,23 @@ ret,frame = cap.read() # Retorna um único frame capturado da câmera
316316
cv2.imwrite('test.png',frame) # Salva o frame capturado no arquivo test.png
317317
```
318318

319+
## Imagem: Acionando sons
320+
321+
`pip install pygame`
322+
323+
```python
324+
import pygame
325+
import time
326+
327+
file = 'aimless-old habits.mp3'
328+
pygame.init()
329+
pygame.mixer.init()
330+
pygame.mixer.music.load(file)
331+
pygame.mixer.music.play()
332+
333+
time.sleep(10)
334+
335+
pygame.mixer.music.stop()
336+
```
337+
319338
<img id="contato" src="img/imagens-palestra/22.png" style="height:300px, ">
-2.33 MB
Binary file not shown.

‎codes/pysound/Akryl - Mocha.mp3

-2.72 MB
Binary file not shown.
-2.25 MB
Binary file not shown.

‎codes/pysound/Alien-Wierdness.wav

268 KB
Binary file not shown.

‎codes/pysound/Window-Break.wav

107 KB
Binary file not shown.

‎codes/pysound/metal.wav

16 KB
Binary file not shown.

‎codes/pysound/play.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import pygame
2+
import time
23

3-
#file = 'aimless-old habits.mp3'
4-
file = 'Akryl-Gradient.mp3'
4+
file = 'aimless-old habits.mp3'
55
pygame.init()
6-
#pygame.mixer.init()
6+
pygame.mixer.init()
77
pygame.mixer.music.load(file)
88
pygame.mixer.music.play()
9-
pygame.event.wait()
9+
10+
time.sleep(10)
11+
12+
pygame.mixer.music.stop()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /