티스토리 뷰
SDL에서 오디오 볼륨 조절하기
아래의
SDL_MixAudioFormat() function을 사용하면 된다. 좀더 자세한 내용은 SDL Wiki를 참고한다.
void SDL_MixAudioFormat(Uint8* dst, const Uint8* src, SDL_AudioFormat format, Uint32 len, int volume)
아래는 예제 코드라고 하기에는 좀 그렇고 SDL_MixAudioFormat
() function을 사용한 코드다.
#include "SDL_audio.h" // SDL_MIX_MAXVOLUME is 128. int audioVolume = (SDL_MIX_MAXVOLUME / (float) 100) * <Volume Level(0~100%)>; // SDL_MixAudioFormat() controls the audio volume. SDL_MixAudioFormat( destStream,(uint8_t *) (videoState->mAudioBuffer + videoState->mAudioBufferIndex),deviceFormat,len,audioVolume); |
'TIL > Media' 카테고리의 다른 글
HLS(HTTP Live Streaming) - HTTP Streaming Architecture (0) | 2016.04.08 |
---|
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- HDFS
- libavformat
- development
- Rolling-Restart
- onbeforeunload
- C/C++
- Programming
- ffmpeg
- Java
- jdk6
- DATABASE
- DB
- JAXB
- fluentd
- springboot
- springframework
- oid
- springjpa
- HTTP Live Streaming
- JDK21
- AVIOContext
- Spring
- CentOS
- programmer
- HLS
- Virtual Thread
- JPA
- jdk7
- popupWindow
- elasticsearch
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함