-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (27 loc) · 761 Bytes
/
Copy pathmain.cpp
File metadata and controls
35 lines (27 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream>
#include <vector>
#include <span>
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include "effects.hpp"
int main(void) {
sf::RenderWindow window(sf::VideoMode(600, 600), "AudioFX", sf::Style::Close);
sf::SoundBuffer audio;
audio.loadFromFile("C:/Users/first/Desktop/ATTEMPTED GUITAR/my audio.wav");
std::vector<sf::Int16> samples(audio.getSamples(), audio.getSamples() + audio.getSampleCount());
applyReverb(audio, .5);
sf::Sound sound;
sound.setBuffer(audio);
sound.play();
audio.saveToFile("C:/Users/first/Desktop/ATTEMPTED GUITAR/bitcrush.wav");
while (window.isOpen()) {
sf::Event e;
while (window.pollEvent(e)) {
switch (e.type) {
case sf::Event::Closed:
window.close();
break;
}
}
}
}