Click here to Skip to main content
15,912,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: An application for mouse click event Pin
«_Superman_»2-Feb-09 20:13
professional«_Superman_»2-Feb-09 20:13 
AnswerRe: An application for mouse click event Pin
Stuart Dootson2-Feb-09 21:29
professionalStuart Dootson2-Feb-09 21:29 
GeneralRe: An application for mouse click event Pin
shubhi2-Feb-09 21:54
shubhi2-Feb-09 21:54 
GeneralRe: An application for mouse click event Pin
Stuart Dootson2-Feb-09 21:57
professionalStuart Dootson2-Feb-09 21:57 
GeneralRe: An application for mouse click event Pin
shubhi2-Feb-09 22:11
shubhi2-Feb-09 22:11 
GeneralRe: An application for mouse click event Pin
Stuart Dootson2-Feb-09 23:09
professionalStuart Dootson2-Feb-09 23:09 
AnswerRe: An application for mouse click event Pin
Hamid_RT3-Feb-09 20:43
Hamid_RT3-Feb-09 20:43 
Questionspeex - undefined reference Pin
Daerner Mandla2-Feb-09 18:47
Daerner Mandla2-Feb-09 18:47 
Hello,

#include "speex/speex.h"
#include <stdio.h>

/*The frame size in hardcoded for this sample code but it doesn't have to be*/
#define FRAME_SIZE 160
int main(int argc, char **argv)
{
   char *inFile;
   FILE *fin;
   short in[FRAME_SIZE];
   float input[FRAME_SIZE];
   char cbits[200];
   int nbBytes;
   /*Holds the state of the encoder*/
   void *state;
   /*Holds bits so they can be read and written to by the Speex routines*/
   SpeexBits bits;
   int i, tmp;

   /*Create a new encoder state in narrowband mode*/
   state = speex_encoder_init(&speex_nb_mode);

   /*Set the quality to 8 (15 kbps)*/
   tmp=8;
   speex_encoder_ctl(state, SPEEX_SET_QUALITY, &tmp);

   inFile = argv[1];
   fin = fopen(inFile, "r");

   /*Initialization of the structure that holds the bits*/
   speex_bits_init(&bits);
   while (1)
   {
      /*Read a 16 bits/sample audio frame*/
      fread(in, sizeof(short), FRAME_SIZE, fin);
      if (feof(fin))
         break;
      /*Copy the 16 bits values to float so Speex can work on them*/
      for (i=0;i<frame_size;i++)>
         input[i]=in[i];

      /*Flush all the bits in the struct so we can encode a new frame*/
      speex_bits_reset(&bits);

      /*Encode the frame*/
      speex_encode(state, input, &bits);
      /*Copy the bits to an array of char that can be written*/
      nbBytes = speex_bits_write(&bits, cbits, 200);

      /*Write the size of the frame first. This is what sampledec expects but
       it's likely to be different in your own application*/
      fwrite(&nbBytes, sizeof(int), 1, stdout);
      /*Write the compressed data*/
      fwrite(cbits, 1, nbBytes, stdout);

   }

   /*Destroy the encoder state*/
   speex_encoder_destroy(state);
   /*Destroy the bit-packing struct*/
   speex_bits_destroy(&bits);
   fclose(fin);
   return 0;
}</stdio.h>


This libs are include
Libs: libspeex.lib und libspeexdsp.lib

But my Compiler Say:
H:\speex\main.cpp|21|undefined reference to `speex_nb_mode'|

What is the mistake?
AnswerRe: speex - undefined reference Pin
Cedric Moonen2-Feb-09 20:23
Cedric Moonen2-Feb-09 20:23 
AnswerRe: speex - undefined reference Pin
alphaxz2-Feb-09 20:50
alphaxz2-Feb-09 20:50 
GeneralRe: speex - undefined reference Pin
Daerner Mandla3-Feb-09 2:30
Daerner Mandla3-Feb-09 2:30 
GeneralRe: speex - undefined reference Pin
Cedric Moonen3-Feb-09 3:09
Cedric Moonen3-Feb-09 3:09 
GeneralRe: speex - undefined reference [modified] Pin
Daerner Mandla3-Feb-09 3:17
Daerner Mandla3-Feb-09 3:17 
QuestionAdding binaries to a registry? Pin
kDevloper2-Feb-09 18:43
kDevloper2-Feb-09 18:43 
AnswerRe: Adding binaries to a registry? Pin
Sarath C2-Feb-09 19:10
Sarath C2-Feb-09 19:10 
GeneralRe: Adding binaries to a registry? Pin
kDevloper2-Feb-09 23:14
kDevloper2-Feb-09 23:14 
QuestionRe: Adding binaries to a registry? Pin
CPallini3-Feb-09 0:37
mveCPallini3-Feb-09 0:37 
AnswerRe: Adding binaries to a registry? Pin
kDevloper3-Feb-09 5:24
kDevloper3-Feb-09 5:24 
AnswerRe: Adding binaries to a registry? Pin
Hamid_RT3-Feb-09 20:42
Hamid_RT3-Feb-09 20:42 
Questionlist of connected cameras with system Pin
anilaabc2-Feb-09 18:34
anilaabc2-Feb-09 18:34 
AnswerRe: list of connected cameras with system Pin
Stuart Dootson2-Feb-09 20:41
professionalStuart Dootson2-Feb-09 20:41 
GeneralRe: list of connected cameras with system Pin
anilaabc6-Feb-09 16:49
anilaabc6-Feb-09 16:49 
Questionusing ace framework Pin
hrishiS2-Feb-09 18:20
hrishiS2-Feb-09 18:20 
AnswerRe: using ace framework Pin
Stuart Dootson2-Feb-09 20:26
professionalStuart Dootson2-Feb-09 20:26 
QuestionHandling the device change functionality for HID Devices Pin
hariakuthota2-Feb-09 18:14
hariakuthota2-Feb-09 18:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.