forked from 0ad/0ad
Minor changes to make the sound code compile without any errors
This was SVN commit r802.
This commit is contained in:
parent
b39a059e10
commit
2bd2dfd6ab
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "CMusicPlayer.h"
|
||||
|
||||
size_t VorbisRead(void *ptr, size_t byteSize, size_t sizeToRead, void *datasource)
|
||||
@ -297,15 +299,15 @@ void CMusicPlayer::empty()
|
||||
|
||||
bool CMusicPlayer::stream(ALuint buffer)
|
||||
{
|
||||
char data[BUFFER_SIZE];
|
||||
char data[AUDIO_BUFFER_SIZE];
|
||||
int size = 0;
|
||||
int section, ret;
|
||||
|
||||
|
||||
|
||||
while(size < BUFFER_SIZE)
|
||||
while(size < AUDIO_BUFFER_SIZE)
|
||||
{
|
||||
ret = ov_read(&oggStream, data + size, BUFFER_SIZE - size,0,2,1,§ion);
|
||||
ret = ov_read(&oggStream, data + size, AUDIO_BUFFER_SIZE - size,0,2,1,§ion);
|
||||
|
||||
if(ret > 0)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
|
||||
#define BUFFER_SIZE (64*1024)
|
||||
#define AUDIO_BUFFER_SIZE (64*1024)
|
||||
|
||||
struct SOggFile
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "CPlayList.h"
|
||||
#include <iostream>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user