mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:56:39 +00:00 
			
		
		
		
	Fix for Visual Studio 2008. stdint.h is not bundled with VS 2008, instead we use cstdint.hpp from BOOST.
This commit is contained in:
		
							parent
							
								
									32a2d1650c
								
							
						
					
					
						commit
						7f26ba2ba3
					
				
					 3 changed files with 10 additions and 4 deletions
				
			
		|  | @ -55,8 +55,9 @@ static void checkALError(const char *where) | |||
| 
 | ||||
| static void getALFormat(SampleSourcePtr inp, int &fmt, int &rate) | ||||
| { | ||||
|   int ch, bits; | ||||
|   inp->getInfo(&rate, &ch, &bits); | ||||
|   int32_t rate_, ch, bits; | ||||
|   inp->getInfo(&rate_, &ch, &bits); | ||||
|   rate = rate_; | ||||
| 
 | ||||
|   fmt = 0; | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| #define MANGLE_SOUND_SOURCE_H | ||||
| 
 | ||||
| #include <string> | ||||
| #include <stdint.h> | ||||
| #include <boost/cstdint.hpp> | ||||
| #include <assert.h> | ||||
| 
 | ||||
| #include "../stream/stream.hpp" | ||||
|  | @ -10,6 +10,8 @@ | |||
| namespace Mangle { | ||||
| namespace Sound { | ||||
| 
 | ||||
| typedef boost::int32_t int32_t; | ||||
| 
 | ||||
| /// A stream containing raw sound data and information about the format
 | ||||
| class SampleSource : public Stream::Stream | ||||
| { | ||||
|  |  | |||
|  | @ -17,7 +17,10 @@ using namespace Mangle::Sound; | |||
| void AudiereSource::getInfo(int32_t *rate, int32_t *channels, int32_t *bits) | ||||
| { | ||||
|   SampleFormat fmt; | ||||
|   sample->getFormat(*channels, *rate, fmt); | ||||
|   int channels_, rate_; | ||||
|   sample->getFormat(channels_, rate_, fmt); | ||||
|   *channels = channels_; | ||||
|   *rate = rate_; | ||||
|   if(bits) | ||||
|     { | ||||
|       if(fmt == SF_U8) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue