trying to add audio implementation
This commit is contained in:
		
							parent
							
								
									79bf77c925
								
							
						
					
					
						commit
						0fb38b5573
					
				@ -37,7 +37,8 @@ SOURCES += main.cpp\
 | 
				
			|||||||
    misc_functions.cpp \
 | 
					    misc_functions.cpp \
 | 
				
			||||||
    aocharmovie.cpp \
 | 
					    aocharmovie.cpp \
 | 
				
			||||||
    aoemotebutton.cpp \
 | 
					    aoemotebutton.cpp \
 | 
				
			||||||
    emotes.cpp
 | 
					    emotes.cpp \
 | 
				
			||||||
 | 
					    aosfxplayer.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEADERS  += lobby.h \
 | 
					HEADERS  += lobby.h \
 | 
				
			||||||
    aoimage.h \
 | 
					    aoimage.h \
 | 
				
			||||||
@ -57,4 +58,8 @@ HEADERS  += lobby.h \
 | 
				
			|||||||
    aomovie.h \
 | 
					    aomovie.h \
 | 
				
			||||||
    misc_functions.h \
 | 
					    misc_functions.h \
 | 
				
			||||||
    aocharmovie.h \
 | 
					    aocharmovie.h \
 | 
				
			||||||
    aoemotebutton.h
 | 
					    aoemotebutton.h \
 | 
				
			||||||
 | 
					    bass.h \
 | 
				
			||||||
 | 
					    aosfxplayer.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unix:LIBS += -L/home/omnitroid/lib/bass_linux -lbass
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										13
									
								
								aosfxplayer.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								aosfxplayer.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					#include "aosfxplayer.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AOSfxPlayer::AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  m_parent = parent;
 | 
				
			||||||
 | 
					  ao_app = p_ao_app;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  std::basic_string<char> path = ao_app->get_sounds_path().toStdString() + "sfx-squee.wav";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  m_stream = BASS_StreamCreateFile(FALSE, path.c_str(), 0, 0, 0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										21
									
								
								aosfxplayer.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								aosfxplayer.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					#ifndef AOSFXPLAYER_H
 | 
				
			||||||
 | 
					#define AOSFXPLAYER_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "bass.h"
 | 
				
			||||||
 | 
					#include "aoapplication.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QWidget>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class AOSfxPlayer
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
					  AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private:
 | 
				
			||||||
 | 
					  QWidget *m_parent;
 | 
				
			||||||
 | 
					  AOApplication *ao_app;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  HSTREAM m_stream;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // AOSFXPLAYER_H
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user